Using Network Attached Storage - NAS
NAS systems provide disk space in the local network by using special networking file systems. In Microsoft Windows environments, this is the SMB or CIFS filesystem. A NAS can be either a usual Windows machine with a network share or a special NAS appliance with its own operating system and management interface.
To ensure successful operation, the NAS should meet the following prerequisites:
- The NAS must not be turned off or put into standby mode at any time, as long as there is a MailStore Server service accessing the database on the NAS. Otherwise database corruption may occur, which can lead to loss of data.
- The read/write capacity should not fall below 5MB/sec.
- When moving an existing MailStore database, the available disk space should be twice the size of the current archive.
Please note: A storage system attached via FibreChannel or iSCSI is called Storage Area Network (SAN) storage. SAN storage is used like a local disk, so that no further configuration is needed to run MailStore Server on it.
In addition to a description of how to install MailStore Server onto an NAS system, as described in the following, you can find information on how to move an existing archive onto an NAS system in the article Moving the Archive.
Install MailStore on the chosen computer, and open the MailStore Server Service Configuration.
- Stop the MailStore Server service either by using the MailStore Server Service Configuration interface or by entering the command 'net stop "MailStore Server"' in a command line.
- Create a directory share on the NAS system.
- There are two ways to enable MailStore to access the directory share:
- Grant the computer object full control over the directory share. This enables the local system account of the computer on which MailStore is installed to access the network. If file system permissions are required on the share, grant the computer object full control here as well.
- Create a user object either on the NAS system or in a directory service (e.g. Active Directory).
- Grant the user object full control over the directory share. If file system permissions are required, grant the user object full control here as well.
Configuration of MailStore Server
In the MailStore Server Service Configuration interface, enter the path for the directory share on the NAS system in UNC notation (\\computer\sharename\). In the example below, the name of the NAS system is NAS01 and the name of the share is MailArchive.
Once the computer object has the appropriate permissions for the directory share, the MailStore service can be restarted by clicking on Start in the MailStore Server Service Configuration interface or by entering 'net start "MailStore Server"' in a command line.
If a user object has been granted permissions for the share, MailStore server must establish a connection to the network share during the start using this user object. To set up the appropriate startup script, please proceed as follows:
- On the MailStore Server computer, open the MailStore Server Service Configuration.
- Click on Startup Script.
- In the text field on the right, enter the net commands to be used to establish the connection to the necessary network shares, e.g.
net use \\nas01\MailArchive /user:mailstoreserver SecretPassw0rd
to connect to the \\nas01\MailArchive network share with the user mailstoreserver and the password SecretPassw0rd.
Important notice: Are the MailStore Server computer and the NAS in different Windows domains or workgroups, the computer name must be put in front of the username, e.g. nas01\mailstoreserver. - Click on Save Changes.
- The MailStore Server service can now be restarted by clicking on Start in the MailStore Server Service Configuration interface or by entering the command 'net start "MailStore Server"' in a command line.
Debugging connection issues
Should any problems accessing the MailStore Server files in the network share occur when using the startup script method, the net command must be executed manually to retrieve the underlying error message.
As the MailStore Server process is executed in the context of the "local system", the windows command prompt must be execute in the same context as well. Therefore the following steps are required:
- Download Windows Sysinternals PSTools and extract the content into a directory on your hard disk.
- Login to the MailStore Server computer as local administrator or execute a command prompt as administrator.
- In the command prompt, change into the directory where you extracted the PSTools.
- Run the following command to switch the context of the command prompt to "local system":
psexec.exe -s cmd.exe
- Verify if that was successful by executing the whoami-command. The output should show nt authority\system.
- Now run the net command from the startup script and try to isolate the root of the issue with the error codes.