Community Knowledge Base

Volume Mounts

To system administrators, a "volume" is an accessible storage area within a file system. These are typically locations on a hard disk or other storage that are assigned drive letters. In order to use these volumes they need to be "mounted". For example, if you plug a USB drive into a Windows laptop that USB drive is automatically assigned a letter, allowing it to be used immediately. This is "mounting" that new "volume" on that laptop. While this is normally done on a server directly via command line or using a drive utility, with SmarterMail, system administrators can also mount Windows or Linux volumes directly from the web interface.

Virtually any area that has a specific path or location, from mail data to logs, can, and probably should, have its own volume mount. This allows administrators to easily scale servers without the usual hardware hassles and without touching core volumes. Best of all, adding a volume is straightforward: set the path, configure your mount and unmount commands, and SmarterMail handles the rest. Your settings stay centralized, your data remains secure, and you stay fully in control.

Uses for Volume Mounts

Be default, SmarterMail sets some default paths for various things: the Spool, logs files, and virus quarantine. In addition, each domain that's added has a Primary Path for its data, and system administrators can add Secondary Paths for domains as well. All of these paths require some type of attached storage location. This is where Volume Mounts can come in handy.

Let's say there's a particularly busy domain — busydomain.com. The amount of message data that this domain generates grows, and grows quickly. Using a Volume Mount, it's possible to mount a new drive and assign it a drive letter: Z:\ (in Windows). The system administrator can then go to busydomain.com and set up a Secondary Path that points to Z:\SmarterMail\Domains\BusyDomain and moves messages and SmarterMail File Storage files that are older than 90 days over to this new location on the newly mounted volume. This data is moved, in the background, but remains indexed and searchable. And each day, new data is moved once it hits whatever age the system administrator designates. The system administrator can then go in and do that for other domains so that older message data moves off of the Primary Path over to the Secondary, saving space on the primary drive.

As demonstrated, using Volume Mounts, an administrator can mount additional storage locations for SmarterMail, then set various paths to use that newly attached storage. Log files can go on one Volume, virus quarantine can go to another Volume. The efficiency of Volume Mounts within SmarterMail, then, is that you don't need to use a Disk Manager or command line to add these Mounts — it's all handled directly from the SmarterMail interface.

Adding New Volume Mounts

To add a new Volume Mount, click the New button. When adding a Volume Mount, the following settings will be available:

  • Volume Mount Path - REQUIRED. This is the location on the volume that will eventually hold the data. For example, "/var/local/folder1" in Linux, or "z:\" in Windows.
  • Mount Script File Name - REQUIRED. Here, you put the file name containing all of the commands you'd need to mount the drive in your particular operating system. In Linux, that script could include multiple commands strung together with "&&" between them. In Windows, this is simplified.
  • Unmount Script File Name - This is file containing the command(s) necessary to unmount the volume. In Linux, that file will include the command "umount [Volume Mount Path]" and in Windows the file will use "net use [Volume Mount Path] /delete".
  • Include Arguments - As with any command-line action, arguments can be added to provide more context or to tell the command line how you want it to act. NOTE: Not all command-line areas support the use of arguments.

Simple Examples

Below are a couple of examples of using Volume Mounts. In both examples we'll mount volumes as simple guest shares, without the need for any credentials. However, this page is extremely flexible and can accommodate virtually any type of mount.

Linux

  • Volume Mount Path:
    /mnt/everyone
  • Mount Script File Name: mountDrive, and that file could include
    mkdir -p /mnt/everyone && echo -e "//it-drive/everyone /mnt/everyone cifs guest,iocharset=utf8,uid=$(id -u),gid=$(id -g),file_mode=0775,dir_mode=0775,nofail 0 0" | tee -a /etc/fstab && mount -a
  • Unmount Script File Name: unmountDrive, and that file could include
    umount /mnt/everyone

Windows

  • Mount Path:
    T:\
  • Mount Script File Name: mountDrive.bat, and that file could include
    net use T:\\it-drive\shared
  • Unmount Script File Name: unmountDrive.bat, and that file could include
    net use T: /delete

Notes

  • Prior to actually adding a mounted volume, SmarterMail will attempt to write/delete a file to the new mount to verify it and check things like permissions. The result of this test is displayed via toast notification.
  • Only Volume Mounts added within SmarterMail will appear on this page. If a volume is mounted on the SmarterMail server directly, it is not displayed.
  • There is no need to mount existing volumes that are already on the server. (You can on Windows, but not in Linux.)
  • When using a Command-Line Script, the script must be located in the Assets folder located within the SmarterMail Service folder. In Windows, the default location is "C:\Program Files (x86) \SmarterTools\SmarterMail\Service\Assets" and in Linux the default location is "/opt/smartermail/assets".