Netapp Snapmirror Setup

Shares

In this tutorial we will concentrate on setting up Netapp’s Snapmirror. In this lab I have two filers with the following hostname ctrlpri and ctrldr. ctrlpri (10.10.10.1) being the primary or source filer and ctrldr (10.10.10.2) being the disaster recovery or destination filer.

1. First up you must license snapmirror on both filers.

2. Enable Snapmirror on both filers.
ctrlpri> options snapmirror.enable on
ctrldr> options snapmirror.enable on

3. Turn on the Snapmirror log
ctrlpri> options snapmirror.log.enable on
ctrldr> options snapmirror.log.enable on

4. You must allow the destination filer access to the source filer. This is done by adding the ip address to /etc/snapmirror.allow on the source filer. NOTE use rdfile /etc/snapmirror.allow first to see if you have any existing entries.
ctrlpri> wrfile /etc/snapmirror.allow
10.10.10.2
ctrldr
Press CTRL-C to exit and save the file.

5. To create a volume for volume based replication we must first create the volume and then restrict it (In this tutorial we have created a destination volume named vol1_dr). After creating the volume, type in this command to restrict it. NOTE: You do not need to restrict the volume for Qtree replication which is explained in step 6b.
ctrldr> vol restrict vol1_dr

6a. The next step is to define what you want to replicate. In this step we will initialize a volume based replication. This is performed on the destination filer.
ctrldr> snapmirror initialize -S ctrlpri:vol1 ctrldr:vol1_dr
Transfer started.
Monitor progress with ‘snapmirror status’ or the snapmirror log

6b. In this step we will initialize a Qtree based replication. This is also performed on the destination filer. NOTE: the destination volume MUST NOT be in restricted mode. The Qtree will automatically be created for you, there is no need to manually create the destination Qtree.
ctrldr> snapmirror initialize -S ctrlpri:/vol/vol1/QtreeVM-NFS ctrldr:/vol/vol1_dr/Qtreevm-NFS
Transfer started.
Monitor progress with ‘snapmirror status’ or the snapmirror log

7. Now that we have our replication going we will want to check the status. On the destination filer perform the following command:
ctrldr> snapmirror status


As the initial baseline transfer is happening you will see the status as Uninitialized, once it completes you will see the status as idle.

8. So we’ve finished our initial baseline transfer and our status shows snapmirror is idle. Let’s schedule 15 minute transfers from source to destination. Use rdfile /etc/snapmirror.conf on the destination filer first to see if the file contains data. Then use the following command:
ctrldr> wrfile /etc/snapmirror.conf
ctrlpri:vol1 ctrldr:vol1_dr – 15 * * * *
CTRL-C to exit and save the file.
This will replicate every 15 minutes. Each * represents a value. Starting from right to left you have day of week, month, day of month, hour minute. Each value can only be a number. i.e. for month enter in 5 for May

You can check out more Snapmirror CLI commands in the Netapp CLI Pocket Guide Page.

Snapmirror Setup, Configuration and Schedule Video Tutorial

If you have any technical questions about this tutorial or any other tutorials on this site, please open a new thread in the forums and the community will be able to help you out.

Disclaimer:
All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.

  • Pingback: Netapp Snapmirror Configuration Tutorial » Server Management News()

  • Andy

    Really useful thank you. quick question. how about setting up snapmirror relationships using cifs and also thin provisioning. do you have any information on how to perform these?
    Thanks

    • Hi Andy, you can use exactly the same steps above for cifs, whether your cifs is located within a volume or within a qtree

  • Werner Wind

    Hello David, I have a question about snapmirroring. Is it possible, from one source volume to make two snapmirror destinations (incl. qtree)?

    Thanks
    Werni

    • Hi Werni, yes it is possible. You will then notice on the source volume there will be 2 snapmirror snapshots, 1 will be for desintation 1 and the other for destination 2

  • thiyagi

    thanks