Table of ContentsView in Frames

Setting up a basic SnapMirror operation

Before initiating SnapMirror operations, you must enable the appropriate licenses on the source and destination systems. Also, you need to specify the destination systems that can access the source system for updates.

Before you begin

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

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

Steps

  1. For both the source and the destination system consoles, enter the following command to enable the SnapMirror license on the source and destination systems:license add snapmirror_license_key
  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. On the destination system, create or edit the /etc/snapmirror.conf file 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 copy replication from vol0 of s_systemA to vol1 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 vol0 to vol1, you must use the following entry:s_systemA:vol0 d_systemA:vol1 - sync

    For more information about schedule entries in the /etc/snapmirror.conf file of the destination system, see the na_snapmirror.conf(5) man page.

  4. On both the source and destination 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.
    If you are setting up a... Then...
    Volume SnapMirror relationship On the destination system console, use the vol create command to create a destination volume, then use the vol restrict command to mark the volume as restricted.
    Qtree SnapMirror relationship Ensure 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. On 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 systemA) to the destination volume (vol2 on systemB): snapmirror initialize -S systemA:vol0 systemB:vol2The destination volume must be configured as restricted and read-only.
    For SnapMirror qtree replication:
    Example
    The following command creates a destination qtree (qtree4 on vol1 on systemB) and transfers a complete copy of the source qtree (qtree4 on vol1 on systemA) to that destination qtree: snapmirror initialize -S systemA:/vol/vol1/qtree4 systemB:/vol/vol1/qtree4The volume in which the destination qtree is created must be online and writable.
    After using the snapmirror initialize command, the scheduled Snapshot copy replication that you specified in Step 3 automatically updates the destination volume or qtree at the specified times.

After you finish

If the SnapMirror source volume or qtree becomes unavailable, 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.