Shameless Plug : I am available for hire to assist with NetApp and StoreVault issues. Please contact me if I can be of any assistance.
SnapMirror is a feature of NetApp filers allowing for business continuity via file system replication to a remote site. This document discusses asynchronous replication, but it is possible to implement synchronous or semi-synchronous replication utilizing an additional license.
Asynchronous replication allows for incremental, block-based replication at least once per minute. Performance impact on the source filer is minimal, and asynchronous mode also allows conservation of network bandwidth.
To enable and configure SnapMirror asynchronous replication, follow these steps.
1.) On both filers, you will need to ensure the SnapMirror license key is present. If it is not, login to both the source and destination filers and issue the following command:
license add < license key >
2.) On the source filer, it is necessary to allow the destination filer SnapMirror access. Login to the source filer and issue the following command:
options snapmirror.access host=< destination filer >
3.) After adding the license, SnapMirror is not enabled by default and as such it must be enabled on both the source and destination filers. Login to both the source and destination filers and issue the following command:
options snapmirror.enable on
4.) The volume names and sizes on the destination filer must be identical to those on the source filer. Login to the destination filer and create the volumes that you will be replicating from the source filer by issuing the following command:
vol create < volume name> < aggregate > <size in gigabytes>G
5.) Now you must restrict access to all the volumes you just created. To restrict access so that we can successfully replicate from the source filer, login to the destination filer and issue the following command:
vol restrict < volume name >
6.) Once the volumes are created and access to them is restricted appropriately we can begin writing the SnapMirror configuration file – snapmirror.conf – and writing it into memory on the destination filer. First, it is necessary to read the contents, if any exist, of the current snapmirror.conf file. To do this, login to the destination filer and issue the following command:
If there is anything located in the file, copy and paste it into notepad at this time as we will be overwriting – NOT amending – the snapmirror.conf file currently in place on the filer.
7.) With the snapmirror.conf file open in Notepad, add lines describing the replication relationship between source and destination volumes. An example line is shown here:
PRODFILER:MyVolume DRFILER:MyVolume kbs=1280 15 * * *
In the above line, the volume named MyVolume on the source filer named PRODFILER is being replicated to DRFILER fifteen minutes past every hour. Additionally, the replication is being limited to 10Mbps. If you have multiple source volumes or multiple source filers it is especially important to schedule volume replications so that they do not overlap.
8.) Once all entries are added to the snapmirror.conf file you are editing in Notepad, highlight and copy all of the lines. It is now necessary to overwrite the existing contents of /etc/snapmirror.conf on the destination file with our new configuration. Login to the destination file and enter the following command:
This will give you nothing more than a blank line. Paste the contents from Notepad, then hit Enter once and then press Ctrl+C. At this point you will get an error stating: “read: error reading standard input: Interrupted system call”. You can safely ignore this error.
9.) Turn SnapMirror on by logging into the destination filer and issuing the following command:
10.) In the event that you change the configuration in the future, issue the following command on the destination file to force SnapMirror to re-read the configuration file:
options snapmirror.enable on
11.) Now that SnapMirror is configured and enabled you must initialize each replicated volume by issuing the following command on the destination filer. Due to formatting, the line is split in the below example but type it all on one line.
snapmirror initialize –S < source filer>:< volume name > < destination filer >:< volume name>
This will start the initial replication and create a baseline for future scheduled replications. I recommend initializing your volumes sequentially instead of in parallel, mainly to preserve network bandwidth and prevent I/O issues from cropping up. To monitor the status of your SnapMirror replication, issue the following command on the destination filer: