Library Table of Contents Index Previous Next Comments

Initializing a SnapMirror destination

When to run a complete SnapMirror transfer  Top

You must use the snapmirror initialize command to perform a complete (baseline) transfer of information whenever you start up a SnapMirror source-destination relationship for the first time. This process is known as initializing a destination.

How quotas apply to destination qtrees  Top

Qtree quotas apply to qtrees in a SnapMirror relationship. If a destination qtree is limited to 100 GB, transfers from a source greater than 100 GB will fail until the source drops to less than 100 GB or the qtree quota is increased on the destination.

User quotas also apply to SnapMirror destination qtrees; however, a SnapMirror qtree update will not fail if user quotas are exceeded.

Initializing a SnapMirror destination volume from tape  Top

You can also initialize a destination volume from tape using the snapmirror store command on the source volume and the snapmirror retrieve command on the destination volume. See SnapMirroring a volume to local tape and Initializing a SnapMirror destination via local tape for more information. The snapmirror store and snapmirror retrieve functions are valid only for volumes, not for qtrees in a SnapMirror relationship.

How to initialize a SnapMirror destination  Top

To initialize a SnapMirror destination, complete the following steps.

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 initial SnapMirror replication of that volume. See Ensuring accessible destinations via CIFS.

Step

Action

1

If the destination is a volume, is online, and has not been initialized before, enter the following command from the destination filer:

vol restrict dest_volume 

dest_volume is the destination volume.

Note
Do not use the vol restrict command on a qtree. If you are initializing a qtree, go to step 2.

Step

Action

2

From the destination filer, enter the following command:

snapmirror initialize [options] [dest_filer:] 
{dest_volume | qtree_path}

options can be one or more of the following:

  • -k n sets the maximum transfer speed to n kilobytes per second. This option has the same effect as the kbs argument in the /etc/snapmirror.conf file.
  • -S [source_filer:]{source_volume | source_qtree_path} specifies the source filer and volume or qtree to copy.

    source_volume is the volume you want to copy.

    The source specified must match an entry for source_volume in the /etc/snapmirror.conf file, if one exists. If an entry exists but does not match, the operation displays an error message and terminates. If there is no entry for the specified source, the command runs.

    source_qtree_path is the path to the qtree you want to copy.
    If the -S option is not set, the source must be specified in the /etc/snapmirror.conf file. If it is not specified, the operation displays an error message and terminates.

    Note
    The source_qtree_path can be a qtree in a SnapMirror destination volume.

  • -c snapshot_name creates a snapshot (with the name snapshot_name) of a qtree on the destination after the next update (so that it does not compete with any ongoing updates). SnapMirror does not lock or delete this snapshot. snapshot_name cannot be minutely.x, hourly.x, nightly.x, or weekly.x, because these names are reserved for scheduled snapshots. This option is valid only for a qtree.
  • -s snapshot_name specifies an existing source qtree snapshot to be transferred. This prevents the normal action of the source creating a snapshot to transfer. SnapMirror does not lock or delete this snapshot. This option is valid only for a qtree SnapMirror replication.

Step

Action

dest_filer is the name of the destination filer. The destination can reside on the same filer as the source or on another filer.

dest_volume or qtree_path specifies the destination volume or qtree. If it is associated with a local source specified in the /etc/snapmirror.conf file, SnapMirror uses that source If the destination volume or qtree specified is not in a scheduled relationship, then the -S option must be used to provide a source.

The snapmirror initialize command creates the destination qtree, but you must specify the destination qtree name at the end of the path as though it already existed. If the destination qtree exists before the command runs, the command fails.

Example 1

filerB> snapmirror initialize -S filerA:vol0 filerB:vol2
Results


SnapMirror transfers a complete copy of the source volume (vol0 on filerA) to the destination volume (vol2 on filerB).

Example 2

filerB> snapmirror initialize -S filerA:/vol/vol1/qtree4 filerB:/vol/vol1/qtree4bak
Results


SnapMirror transfers a complete copy of the qtree source (qtree4 on vol1 on filerA) to the destination qtree (qtree4bak on vol1on filerB).

Initializing a destination for non-qtree data  Top

Non-qtree data is any data on a filer that is not contained in its qtrees. Non-qtree data can include:

To use SnapMirror to replicate non-qtree data from a source to a destination, complete the following step.

Step

Action

1

From the destination filer, enter the following command:

snapmirror initialize -S 
source_filer:/vol/source_volume/- 
dest_filer:/vol/dest_volume/qtree_name

The dash (-) character indicates all non-qtree data in the specified volume.

The snapmirror initialize command transfers the non-qtree data in the volume you specify, but you must specify the destination qtree name at the end of the path as though it already existed. If the destination qtree exists before the command runs, the command fails.

Example

 
filerB> snapmirror initialize -S filerA:/vol/vol3/-
filerB:/vol/vol4/non_qtree_data_in_vol3
Results


SnapMirror transfers to the destination qtree (non_qtree_data_in_vol3 on vol4 on filerB) a complete copy of all the data in filerA, volume 3, that is not a part of a qtree.

After the transfer, the non-qtree data can only be a SnapMirror source, never a destination. Although you can copy data from the non-qtree data to another qtree, you cannot copy data to the non-qtree data from another qtree.

If you run the snapmirror quiesce or the snapmirror break command on the destination volume (/vol/vol4/non_qtree_data_in_vol3), you can resynchronize the destination volume to the source volume, as in this example:

filerB> snapmirror resync -S /vol/vol3/- 
/vol/vol4/non_qtree_data_in_vol3

You cannot resynchronize the two qtrees in the opposite direction.

To summarize, you cannot make /vol/volname/- a SnapMirror destination. This non-qtree data can only be a SnapMirror source.

How snapmirror initialize copies volumes  Top

When the snapmirror initalize command copies a volume, it creates a snapshot of all the data on the source and transfers it to the destination. The destination is a volume you have already created and marked restricted. After SnapMirror finishes transferring the data, it brings the destination online, but in a read-only state. This version of the destination is the baseline for the first incremental update.

Note
While the initial data transfer is taking place, the destination is marked "invalid" in the output of a vol status command. The volume becomes valid and goes online once the initial transfer is complete.

How snapmirror initialize copies qtrees  Top

To use SnapMirror to copy a qtree, you do not create a destination qtree because the snapmirror initialize command creates it. The volume where you want the destination qtree to be must be online. After the destination qtree is initialized, it is no longer writable; however, the rest of the volume where that qtree resides is still writable.

The destination snapshot created by qtree initialization is marked "busy" in the output of the snap list command until the next transfer is complete.

What happens after SnapMirror makes the initial copy to the destination  Top

After you initialize a SnapMirror volume replication, the files and snapshots in the source volume are available on the destination.

After you initialize a SnapMirror qtree replication, the files on the source qtree are available on its destination qtree.

You can export the destination for NFS mounting or add a share corresponding to the destination for CIFS sharing.

How to check on the initialization of a volume  Top

To check that a destination volume has been initialized, you can use the snapmirror status command. For more information, see Checking SnapMirror data transfer status. If you specify no options or arguments, the snapmirror status command shows the status of the volumes in the filer, as shown in the example below. You also can use the vol status or the qtree command to check whether the volume or qtree is a SnapMirror destination.

filerA> snapmirror status
Snapmirror is on.
Source        Destination     State         Lag       Status
filerA:vol0   filerA:vol0bak  Snapmirrored  00:56:58  Idle
filerA:vol1   filerB:vol6     Source        23:69:26  Transferring
(126 MB done)

How to check on the initialization of a qtree  Top

To check that a destination qtree has been created and initialized, you can use the qtree command. If you specify no options or arguments, the qtree command shows the status of all the qtrees in the filer, as in the example below.

filerA> qtree
Volume         Tree   Style Oplocks   Status
--------       -----  ----- -------   ------
vol0                  unix  enabled   normal
qtree24               unix  enabled   normal
filerB_vol0           unix  disabled  normal
filerB_vol0    qt1    mixed enabled   snapmirrored
filerB_vol0    qt2    unix  disabled  normal
filerB_vol0    qt3    ntfs  enabled   snapmirrored

Note
When the qtree command is run from a MultiStoreTM vfilerTM unit, any qtree that is either a SnapMirror destination or part of a volume that is a SnapMirror destination has read_only in the Status column of the output.

How snapmirror initialize matches source and destination volume size  Top

When you use the snapmirror initialize command to initialize a volume replication, SnapMirror sets the vol options fs_size_fixed option to on. This option forces the file system on the destination volume to remain the same size as the file system on the source volume.

What you can do if initialization fails or is interrupted  Top

When an initialization fails because of a reboot or other interruption, you can restart it by re-entering the snapmirror initialize command if all the following conditions are present:

SnapMirror does not automatically retry to initialize a destination.

Library Table of Contents Index Previous Next Comments