Table of ContentsLibraryView in Frames

Setting up a basic SnapMirror operation

You must have the proper licenses installed and source storage systems must know where they are replicating data before replicating data.

Before You Begin

If your source volumes contain directories that are accessed by CIFS clients, ensure that those directories are in the Unicode format before replicating the volume using SnapMirror.

Also, ensure that you have appropriate SnapMirror licenses for both the source and destination storage systems.

Steps

  1. For both the source and the destination system consoles, use the license add command to enable the SnapMirror license on the source and destination storage systems.license add snapmirror_license_code
  2. On the source system console, use the options snapmirror.access command to specify the host names of systems that are allowed to copy data directly from the source system.

    Example

    options snapmirror.access host=d_systemA

  3. Through the Data ONTAP AdminHost, create or edit the /etc/snapmirror.conf file on the destination system to specify the volumes and qtrees to be copied and the schedule (minute hour day_of_month day_of_week or sync) on which the destination is updated.

    Example

    The following entry specifies Snapshot mirroring from volume 0 of s_systemA to volume 1 of d_systemA at a maximum of 2,000 kilobytes per second 15 minutes past every hour, Monday through Friday.s_systemA:vol0 d_systemA:vol1 kbs=2000,restart=always 15 * * 1,2,3,4,5

    To synchronously mirror volume 0 to volume 1, use an entry similar to the following.s_systemA:vol0 d_systemA:vol1 - sync

    For more information on schedule entries in the destination storage system’s /etc/snapmirror.conf file, the na_snapmirror.conf(5) man page.

  4. In both the source and destination storage system consoles, use the snapmirror on command to enable SnapMirror on the source and destination systems.
  5. Prepare the destination system appropriately, depending on whether you are setting up SnapMirror volume or qtree replication.

    • SnapMirror volume replication—In the destination system console, use the vol create command to create a volume to be the destination for the volume on the source, then use the vol restrict command to mark the volume as restricted.
    • If you are setting up SnapMirror qtree replication, make sure that the volume on the destination system where you want to replicate a qtree with SnapMirror is online and not restricted. Do not manually create a destination qtree.

  6. In the destination system console, use the snapmirror initialize command to create an initial complete (baseline) copy of the source on the destination and start the mirroring process.

    For SnapMirror volume replication:

    Example

    Invoking the following command transfers a complete copy of the source volume (vol0 on system A) to the destination volume (vol2 on system B). The destination volume must be configured as restricted and read-only.snapmirror initialize -S systemA:vol0 systemB:vol2

    For SnapMirror qtree replication:

    Example

    Invoking the following command creates a destination qtree (qtree4 on vol1on system B) and transfers a complete copy of the source qtree (qtree4 on vol1 on system A) to that destination qtree. The volume in which the destination qtree is created must be online and writable.snapmirror initialize -S systemA:/vol/vol1/qtree4 systemB:/vol/vol1/qtree4

    After you invoke the snapmirror initialize command, the scheduled Snapshot mirroring that you specified in Step 3 will automatically update the destination volume or qtree at the specified times.

  7. In the event that the SnapMirror source volume or qtree is disabled, you can use the snapmirror break command to make the destination volume or qtree writable. This enables you to provide continued access to data for the clients who are no longer able to access the unavailable source system.