Library Table of Contents Index Previous Next Comments

Setting up a basic SnapMirror operation

About a basic SnapMirror setup  Top

This section describes the use of the SnapMirror feature for basic data replication between the SnapMirror source and destination, and basic recovery operations.

Note
If your source volumes contain directories that are accessed by CIFS clients, ensure that those directories are in Unicode format before carrying out the SnapMirror replication of that volume. See Ensuring accessible destinations via CIFS.

Step

Action

1

Make sure you have purchased a SnapMirror license for both the source and destination filers.

2

In both the source filer and the destination filer consoles, use the license add command to enable the SnapMirror license on the source and destination filers.

license add snapmirror_license_code

For more information see Entering license codes.

3

On the source filer console, use the options snapmirror.access command to specify the host names of filers that are allowed to copy data directly from the source filer. For example:

options snapmirror.access host=d_filerA

For more information see How to specify destination filers on the source filer.

4

Through the Data ONTAP AdminHost, create or edit the /etc/snapmirror.conf file on the destination filer to specify the volumes and qtrees to be copied and the schedule (minute hour day_of_month day_of_week) on which the destination is updated. For example, the following entry specifies snapshot mirroring from volume 0 of s_filerA to volume 1 of d_filerA at a maximum of 2000 kilobits per second every 15 minutes past every hour, Monday through Friday.

s_filerA:vol0 d_filerA:vol1 kbs=2000,restart=always 15 * 
* 1,2,3,4,5

For more information on schedule entries in the destination filer's /etc/snapmirror.conf file, see Defining source and destination through snapmirror.conf.

5

In both the source filer and destination filer console, use the snapmirror on command to enable SnapMirror on the source and destination filers.

For more information, see Enabling SnapMirror.

6

Prepare the destination filer appropriately, depending on whether you are setting up SnapMirror volume or qtree replication.

  • If you are setting up SnapMirror volume replication, in the destination filer console, use the vol create command to create a volume to be the destination for the snapmirrored 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 filer where you want to replicate a qtree with SnapMirror is online and not restricted. Do not manually create a destination qtree.

For more information, see the information about creating volumes in the "Data Organization Using Volumes and Qtrees" section of the System Administrator's Guide; and see the information on restricting volumes in How to initialize a SnapMirror destination.

7

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

SnapMirror volume replication example

Invoking the following command line transfers a complete copy of the source volume (vol0 on filerA) to the destination volume (vol2 on filerB). The destination volume must be configured as restricted and read-only.

snapmirror initialize -S filerA:vol0 filerB:vol2

SnapMirror qtree replication example

Invoking the following command line creates a destination qtree (qtree4 on vol1on filerB) and transfers a complete copy of the qtree source (qtree4 on vol1 on filerA) to that destination qtree. The volume in which the destination qtree is created must be online and writable.

snapmirror initialize -S filerA:/vol/vol1/qtree4 
filerB:/vol/vol1/qtree4

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

See Initializing a SnapMirror destination for more information.

8

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 and able to provide continuous file and data service to the clients who are no longer able to access the disabled source filer. For more information, see Converting a destination to a writable volume or qtree.

Library Table of Contents Index Previous Next Comments