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

[checked revision][unchecked revision]
m
Line 1: Line 1:
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.
+
Network Attached Storage (NAS) systems provide file-based access to their own local storage  to remote clients via special network protocols. In Microsoft Windows environments, the SMB or CIFS protocol is typically used to access files on a remote system. Throughout this article, the term ''NAS'' represents any computer system that is capable of sharing its own local storage via SMB or CIFS protocol, may it be a traditional Windows file server, a Linux server with a running Samba service, or a dedicated physical or virtual 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.
+
'''Please note:''' A storage system attached via FibreChannel, iSCSI, or other block-level storage protocols, is called Storage Area Network (SAN) storage. SAN storage is used like any other local disk (also referred to as  Direct Attached Storage or DAS); no further configuration is needed to let MailStore Server store its data on it.
 +
 
 +
MailStore Server can utilize NAS systems to store its production data or as target for its backup data.
  
 
To ensure successful operation, the NAS should meet the following prerequisites:
 
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>
+
* <span class="mswarning">The NAS must not be turned off, disconnected, or put into standby mode at any time, as long as there is a MailStore Server service accessing the data on the NAS. Otherwise data corruption may occur, which can lead to irreparable 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.  
  
'''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.
+
== Creating a Network Share ==
 +
The follow three steps are needed to setup a network share that can be used by MailStore Server:
 +
 
 +
# Create a dedicated folder for the MailStore data to reside in on the NAS.
 +
# Share that folder on the network via SMB or CIFS protocol. Please consult the vendor's documentation on how to share a folder on the network.
 +
# Authorize either a computer or user objec to access the network share
 +
 
 +
=== Authorizing a Computer Object ===
 +
As the MailStore Server service runs under the account of the ''SYSTEM'' user on the Windows operating system, the ''SYSTEM'' user is identified by the computer object (e.g. SERVER01$) where MailStore Server is installed on when accessing network resources. Thus permissions to access the network share must be granted to the corresponding computer object.
  
== Configuration of the NAS Directory Share ==
+
'''Please note:''' Granting access to computer objects, requires all involved systems to be part of an Active Directory domain. If this requirement cannot be satisfied, or the NAS system does not support granting access to computer objects at all, use the instructions in the [[Using_Network_Attached_Storage_(NAS)#Authorizing a User Object|Authorizing a User Object]] section instead.
* 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 network share. This enables the local system account of the computer on which MailStore Server is installed to access the network 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_01.png|center]]
 +
* If file system permissions are required on the shared directory, grant the computer object full control here as well.
 
*: [[File:Tech_netshares_02.png|center]]
 
*: [[File:Tech_netshares_02.png|center]]
  
=== Authorizing the User Object to Access the Directory Share ===
+
=== Authorizing a User Object ===
* Create a user object either on the NAS system or in a directory service (e.g. Active Directory).  
+
* Create a user object either locally 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.
+
* Grant the user object full control over the directory share.  
 
*: [[File:Tech_netshares_04.png|center]]
 
*: [[File:Tech_netshares_04.png|center]]
 +
* If file system permissions are required, grant the user object full control here as well.
 
*: [[File:Tech_netshares_05.png|center]]
 
*: [[File:Tech_netshares_05.png|center]]
  

Revision as of 13:01, 15 May 2020

Network Attached Storage (NAS) systems provide file-based access to their own local storage to remote clients via special network protocols. In Microsoft Windows environments, the SMB or CIFS protocol is typically used to access files on a remote system. Throughout this article, the term NAS represents any computer system that is capable of sharing its own local storage via SMB or CIFS protocol, may it be a traditional Windows file server, a Linux server with a running Samba service, or a dedicated physical or virtual appliance with its own operating system and management interface.

Please note: A storage system attached via FibreChannel, iSCSI, or other block-level storage protocols, is called Storage Area Network (SAN) storage. SAN storage is used like any other local disk (also referred to as Direct Attached Storage or DAS); no further configuration is needed to let MailStore Server store its data on it.

MailStore Server can utilize NAS systems to store its production 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, disconnected, or put into standby mode at any time, as long as there is a MailStore Server service accessing the data on the NAS. Otherwise data corruption may occur, which can lead to irreparable loss of data.
  • When moving an existing MailStore database, the available disk space should be twice the size of the current archive.

Creating a Network Share

The follow three steps are needed to setup a network share that can be used by MailStore Server:

  1. Create a dedicated folder for the MailStore data to reside in on the NAS.
  2. Share that folder on the network via SMB or CIFS protocol. Please consult the vendor's documentation on how to share a folder on the network.
  3. Authorize either a computer or user objec to access the network share

Authorizing a Computer Object

As the MailStore Server service runs under the account of the SYSTEM user on the Windows operating system, the SYSTEM user is identified by the computer object (e.g. SERVER01$) where MailStore Server is installed on when accessing network resources. Thus permissions to access the network share must be granted to the corresponding computer object.

Please note: Granting access to computer objects, requires all involved systems to be part of an Active Directory domain. If this requirement cannot be satisfied, or the NAS system does not support granting access to computer objects at all, use the instructions in the Authorizing a User Object section instead.

  • Grant the computer object full control over the network share. This enables the local system account of the computer on which MailStore Server is installed to access the network share.
    Tech netshares 01.png
  • If file system permissions are required on the shared directory, grant the computer object full control here as well.
    Tech netshares 02.png

Authorizing a User Object

  • Create a user object either locally on the NAS system or in a directory service (e.g. Active Directory).
  • Grant the user object full control over the directory share.
    Tech netshares 04.png
  • If file system permissions are required, grant the user object full control here as well.
    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