Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) 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.

Guidelines when creating a qtree SnapMirror relationship  Top

The following are guidelines for qtrees in a SnapMirror relationship:

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 Using SnapMirror to copy 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 when using 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 system:

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 system, enter the following command:

snapmirror initialize [options] [dest_system:] 
{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_system:]{source_volume | source_qtree_path} specifies the source system 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 copy (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 copy. snapshot_name cannot be minutely.x, hourly.x, nightly.x, or weekly.x, because these names are reserved for scheduled Snapshot copies. This option is valid only for a qtree.
  • -s snapshot_name specifies an existing source qtree Snapshot copy to be transferred. This prevents the normal action of the source creating a Snapshot copy to transfer. SnapMirror does not lock or delete this Snapshot copy. This option is valid only for a qtree SnapMirror replication.

Step

Action

 

dest_system is the name of the destination system. The destination can reside on the same system as the source or on another system.

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

Using the following command, SnapMirror transfers a complete copy of the source volume (vol0 on systemA) to the destination volume (vol2 on systemB):

systemB> snapmirror initialize -S systemA:vol0 systemB:vol2

Example 2

Using the following command, SnapMirror transfers a complete copy of the qtree source (qtree4 on vol1 on systemA) to the destination qtree (qtree4bak on vol1on systemB):

systemB> snapmirror initialize -S systemA:/vol/vol1/qtree4 
systemB:/vol/vol1/qtree4bak

Initializing a destination for non-qtree data  Top

Non-qtree data is any data on a system 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 system, enter the following command:

snapmirror initialize -S 
source_system:/vol/source_volume/- 
dest_system:/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

Using the following command, SnapMirror transfers to the destination qtree (non_qtree_data_in_vol3 on vol4 on systemB) a complete copy of all the data in systemA, volume 3, that is not a part of a qtree:

systemB> snapmirror initialize -S systemA:/vol/vol3/-
systemB:/vol/vol4/non_qtree_data_in_vol3

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:

systemB> 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 copy 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 copy 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 Snapshot copies 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 system, 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.

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

Checking on the initialization of a qtree  Top

To check that a destination qtree has been created and initialized, complete the following step.

Step

Action

1

Enter the following command:

qtree

If you specify no options or arguments, the qtree command shows the status of all the qtrees in the storage system, as in the following example:

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

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 Page (Alt-p) Next Page (Alt-n) Comments