Difference between revisions of "Using Network Attached Storage - NAS"

[unchecked revision][checked revision]
(Created page with 'Since version 4.0, MailStore supports the storage on NAS (Network Attached Storage) systems. To ensure successful operation, the NAS should meet the following prerequisites: * T…')
 
m
(40 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Since version 4.0, MailStore supports the storage on NAS (Network Attached Storage) systems. To ensure successful operation, the NAS should meet the following prerequisites:
+
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 file system. 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.
  
* The NAS offers SMB/CIFS support in order to be able to provide Windows shares in the network or is attached to the server via FibreChannel or iSCSI
+
MailStore Server can utilize NAS systems to store its productive data or as target for its backup data.
* The read/write capacity should not fall below 5MB/sec.
+
 
 +
To ensure successful operation, the NAS should meet the following prerequisites:
 +
 
 +
* <span class="mswarning">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.</span>
 
* When moving an existing MailStore database, the available disk space should be twice the size of the current archive.  
 
* When moving an existing MailStore database, the available disk space should be twice the size of the current archive.  
  
To use MailStore with storage on an NAS, two options are available. Both are described in the following.      
+
'''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; no further configuration is needed to let MailStore Server store its data on it.
 +
 
 +
== Configuration of the NAS Directory Share ==
 +
* Create a new directory share on the NAS system. Consult the documentation of the Windows system, of the used operation system or of the appliance if necessary.
 +
* The MailStore Server service runs under the account of the ''SYSTEM'' user on the Windows system. In network environments the ''SYSTEM'' user is identified by the computer object where MailStore Server is installed on. There are two ways to grant the MailStore Server service permissions on a directory share.
 +
 
 +
=== Authorizing the Computer Object 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. 
 +
*: '''Note:''' Some NAS systems do not support computer objects. Grant a user object permissions on the directory share in this case.
 +
*: [[File:Tech_netshares_01.png|center]]
 +
*: [[File:Tech_netshares_02.png|center]]
 +
 
 +
=== Authorizing the User Object to Access the Directory Share ===
 +
* 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.
 +
*: [[File:Tech_netshares_04.png|center]]
 +
*: [[File:Tech_netshares_05.png|center]]
 +
 
 +
== Installing MailStore Server while using a NAS system ==
 +
* Install MailStore Server on your computer. Detailed instructions can be found in the [[Installation]] section if the MailStore manual.
 +
* Open the [[MailStore Server Service Configuration]]. A link can be found on the desktop.
 +
* Stop the MailStore Server service.
 +
* Navigate to ''General'' and 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.
 +
 
 +
[[File:Tech_netshares_06.png|center|550px]]
 +
 
 +
If you have granted the computer object the appropriate permissions for the directory share, the MailStore service can be restarted by clicking on ''Start'' in the MailStore Server Service Configuration interface.
 +
 
 +
=== Using a startup script ===
 +
If a user object has been granted permissions on 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. <pre>net use \\nas01\MailArchive /user:mailstoreserver SecretPassw0rd</pre> to connect to the <code>\\nas01\MailArchive</code> network share with the user ''mailstore'' and the password ''SecretPassword''.<br/>'''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. <code>/user:nas01\mailstore</code>
 +
*:[[File:Tech_netshares_07.png|center|550px]]
 +
* Click on ''Save Changes''.
 +
* The MailStore Server service can now be restarted by clicking on ''Start'' in the MailStore Server Service Configuration.
 +
 
 +
== Moving the archive to a Network Share ==
  
'''Please note:''' If the NAS is attached to the server via FibreChannel or iSCSI, no further configuration steps are needed, as long as the NAS device can be accessed as a local hard disk with a drive letter assigned to it.
+
Moving the archive to a network share is described in the article [[Moving_the_Archive#Moving_the_Archive_to_a_Network_Share|Moving the Archive]].
  
== Installing of MailStore on an NAS Directory Share ==
+
== Writing a backup to a Network Share ==
  
Install MailStore on the chosen computer, and open the MailStore Server Base Configuration.
+
* Create a network share as described in [[#Configuration_of_the_NAS_Directory_Share|Configuration of the NAS Directory Share]].
 +
* If a user object has been granted permissions on the share, you have to configure a [[#Using_a_startup_script|startup script]].
 +
* Follow the instructions from the [[Backup_and_Restore#Using_the_MailStore_Integrated_Backup_Feature|backup article]].
  
* Stop the MailStore Server service either by using the base configuration interface or by entering the command 'net stop "MailStore Server"' in a command line.
+
== Troubleshooting ==
* Create a directory share on the NAS system.
+
In case of errors or problems the [[MailStore_Server_Service_Configuration#Event_Viewer|event viewer]] or [[MailStore_Server_Service_Configuration#Debug_Log|debug log]] can be used to troubleshoot.
* There are two ways to enable MailStore to access the directory share:
 
*:'''Authorizing the computer object 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. 
 
*:[[File:Tech_netshares_01.png|center]]
 
*:[[File:Tech_netshares_02.png|center]]
 
*:'''Authorizing the user object to access the directory share'''
 
*:Create a user object - either on the MailStore Server machine or in Active Directory - which has local administrative permissions on the MailStore Server machine. 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.
 
*:[[File:Tech_netshares_04.png|center]]
 
*:[[File:Tech_netshares_05.png|center]]
 
* In the MailStore Server base 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.
 
*:[[File:Tech_netshares_06.png|center]]
 
* 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 base configuration interface or by entering 'net start "MailStore Server"' in a command line.
 
* If a user object has been granted permissions for the share, the user account used to execute the MailStore Server service must be customized: On the MailStore Server computer under Administrative Tools, open the Services administration and then the properties for the MailStore Server service. Click on the Log On tab. Mark This Account and select the user created above. Enter the password twice, click on OK and close the Services administration.
 
*:[[File:Tech_netshares_07.png|center]]
 
* The MailStore Server service can now be restarted by clicking on Start in the MailStore Server base configuration interface or by entering the command 'net start "MailStore Server"' in a command line.
 
'''Please note:''' If a user object is used, the following error message may appear when trying to start the MailStore Server service: "The credentials supplied to the package were not recognized." The service will not be started. This is unlikely but if this is the case, please contact technical support.
 
  
== Moving an Existing MailStore Installation to an NAS Directory Share ==
+
[https://cs.mailstore.com/index.php?/Knowledgebase/Article/View/73/10/debugging-nas-connection-issues Debugging NAS connection issues]
When moving an existing installation, the existing databases are moved to an NAS directory share; the MailStore application itself remains untouched.
 
  
The procedure for installing onto an NAS directory share, as described above, applies; the following steps are to be carried out:
+
[https://cs.mailstore.com/index.php?/Knowledgebase/Article/View/99/10/a-mailstore-database-residing-on-a-network-share-cannot-be-opened Opportunistic Locking]
  
* Stop the MailStore Server service by either using the base configuration interface or entering the command 'net stop "MailStore Server"' in a command line.
+
[[de:Verwendung_von_Network_Attached_Storage_(NAS)]]
* Create a backup of the MailStore databases.
+
[[en:Using Network Attached Storage (NAS)]]
* Create a directory share on the NAS system.
 
* Grant permissions for the directory share either to the MailStore Server computer object or to a user object that has local administrative permissions on the MailStore Server computer.
 
* If a user object has been granted permissions to the share, please change the user account which is used to run the MailStore Server service from local system account to user object.
 
* Adjust the path for the master database in the MailStore Server base configuration interface. Enter the path for the directory share on the NAS system in UNC notation (\\computer\share\).
 
* Copy or move all files from the original archive directory to the new share on the NAS system.
 
* Restart the MailStore Server service.
 

Revision as of 10:58, 13 February 2018

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 file system. 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.

MailStore Server can utilize NAS systems to store its productive data or as target for its backup data.

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.
  • 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; no further configuration is needed to let MailStore Server store its data on it.

Configuration of the NAS Directory Share

  • Create a new directory share on the NAS system. Consult the documentation of the Windows system, of the used operation system or of the appliance if necessary.
  • The MailStore Server service runs under the account of the SYSTEM user on the Windows system. In network environments the SYSTEM user is identified by the computer object where MailStore Server is installed on. There are two ways to grant the MailStore Server service permissions on a directory share.

Authorizing the Computer Object 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.
    Note: Some NAS systems do not support computer objects. Grant a user object permissions on the directory share in this case.
    Tech netshares 01.png
    Tech netshares 02.png

Authorizing the User Object to Access the Directory Share

  • 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.
    Tech netshares 04.png
    Tech netshares 05.png

Installing MailStore Server while using a NAS system

  • Install MailStore Server on your computer. Detailed instructions can be found in the Installation section if the MailStore manual.
  • Open the MailStore Server Service Configuration. A link can be found on the desktop.
  • Stop the MailStore Server service.
  • Navigate to General and 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.
Tech netshares 06.png

If you have granted the computer object the appropriate permissions for the directory share, the MailStore service can be restarted by clicking on Start in the MailStore Server Service Configuration interface.

Using a startup script

If a user object has been granted permissions on 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 mailstore and the password SecretPassword.
    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. /user:nas01\mailstore
    Tech netshares 07.png
  • Click on Save Changes.
  • The MailStore Server service can now be restarted by clicking on Start in the MailStore Server Service Configuration.

Moving the archive to a Network Share

Moving the archive to a network share is described in the article Moving the Archive.

Writing a backup to a Network Share

Troubleshooting

In case of errors or problems the event viewer or debug log can be used to troubleshoot.

Debugging NAS connection issues

Opportunistic Locking