SnapMirror 7DOT CLI Notes and Procedures: Part 1/2


Section 1/2: Notes

SnapMirror Over Multiple Paths:

Example in /etc/snapmirror.conf:
SRC_conf = multi (SRC-e0a,DEST-e0a) (SRC-e0b,DEST-e0b)
SRC_conf:vol1 DEST:vol1 - sync

Throttle Network Usage:

Example in /etc/snapmirror.conf:
snapmirror throttle {n} DEST:DEST_PATH
n = throttle value in kilobytes per second (1 to 125’000)

Options:
options replication.throttle.enable {on/off}
options replication.throttle.incoming.max_kbps {value}
options replication.throttle.outgoing.max_kbps {value}

Planning for SnapMirror Updates:

Use the -
snap delta VOL_NAME
- command to determine the rate of data change between Snapshot copies on a volume.

Compare the file system size of the two volumes with:
vol status -b VOL_NAME
Note: The snapmirror initialize sets the vol options fs_size_fixed to on!

SnapMirror Access:

Use the -
snapmirror.access
- option or create the file -
/etc/snapmirror.allow

SnapMirror.Conf:

Syntax:
SRC:/vol/SRC_VOL/{SRC_QTREE} DEST:/vol/DEST_VOL/{DEST_QTREE} {arguments} {schedule}
Note: Schedule is - minute hour day_of_month day_of_week

Arguments:
Check the manual for - Transfer speed, Restart Mode, Checksum, Ops (Outstanding) suffix, Visibility interval, TCP window size

snapmirror status:

-l displays the long format of the output
-q displays which volumes or qtrees are quiesced or quiescing

Listing SnapMirror Snapshot Copies:

Use:
snap list

SnapMirror Snapshot copies are distinguished by their naming convention, for example*:
DEST(0012345678)_vol01.0
*destination_system(sysid)_volume.number
Note: If SnapMirror Snapshot copies are deleted, affected relationships will have to be re-initialized!

SnapMirror Log Files:

options snapmirror.log.enable on/off
Note 1: default is on
Note 2: location /etc/logs/snapmirror

Converting a Replica to a Writable File System:

This is done on the destination:
snapmirror quiesce /vol/DEST_VOL/DEST_QTREE
snapmirror break /vol/DEST_VOL/DEST_QTREE

Re-synchronizing a Broken-off Relationship:

This is done on the system with the less up-to-date file system:
snapmirror resync DEST_HOSTNAME:DEST_VOL

Making a Break Permanent:

SRC> snapmirror destinations SRC_VOL
SRC> snapmirror release SRC_VOL DST_HOSTNAME:DST_VOL
Note: Remember to remove the entry from the /etc/snapmirror.conf file!

Snapmirror Migrate:

The snapmirror migrate command is run on the storage system which holds the source volume:
snapmirror migrate SRC_HOSTNAME:SRC_VOL DST_HOSTNAME:DST_VOL
This stops NFS and CIFS on the source, migrates NFS file handles to the destination, makes the source restricted, and makes the destination volume read-write.

Section 2/2: Procedures

Procedure 1: How to Create SnapMirror Relationships

Note 1: snapmirror and snapmirror_sync licenses have already been added to SRC and DES, and D2 has the snapmirror license.
Note 2: Source volume has been created.
Note 3: Here we have two destinations to create a cascaded relationship from SRC -> DES -> D2.

Verify volumes are created and online:
SRC> vol status
Specify hostnames of the SnapMirror destination systems:
SRC> options snapmirror.access host=DES,D2

Create volume on destination (DES):
DES> vol create vol1 aggr1 10g
Set volume options:
DES> vol options vol1 create_ucode on
DES> vol options vol1 convert_ucode on
Restrict the volume:
DES> vol restrict vol1
Verify destination volumes are restricted:
DES> vol status
Initialize the SnapMirror:
DES> snapmirror initialize -S SRV:vol1 DES:vol1
Monitor the status of the transfer:
DES> snapmirror status
Create (or edit) the snapmirror.conf file:
DES> wrfile /etc/snapmirror.conf
SRC:vol1 DES:vol1 - sync
{Ctrl C exits wrfile}
Verify the relationships are in sync:
DES> snapmirror status -l
List the snapshot copies:
DES> snap list vol1
Authorize the second destination system:
DES> options snapmirror.access host=D2

Create volume on destination (D2):
D2> vol create vol1 aggr1 10g
Set volume options:
D2> vol options vol1 create_ucode on
D2> vol options vol1 convert_ucode on
Restrict the volume:
D2> vol restrict vol1
Verify destination volumes are restricted:
D2> vol status
Initialize the SnapMirror:
D2> snapmirror initialize -S DES:vol1 D2:vol1
Monitor the status of the transfer:
D2> snapmirror status
Create (or edit) the snapmirror.conf file:
D2> wrfile /etc/snapmirror.conf
DES:vol1 D2:vol1 - 0-59/5***
{Ctrl C exits wrfile}
Verify the relationships are in sync:
D2> snapmirror status -l
List the snapshot copies:
D2> snap list vol1

Back on SRC!
Verify the status of the SnapMirror relationships:
SRC> snapmirror status
List the snapshot copies:
SRC> snap list vol1
List all the snapmirror destinations:
SRC> snapmirror destinations
Read the snapmirror log:
SRC> rdfile /etc/log/snapmirror

Here we convert a snapmirror sync to semi-sync!
Verify the status of the SnapMirror relationships:
DES> snapmirror status
Display the contents of snapmirror.conf:
DES> rdfile /etc/snapmirror.conf
Modify the contents of snapmirror.conf:
DES> wrfile /etc/snapmirror.conf
SRC:vol1 DES:vol1 outstanding=10s sync
{Ctrl C exits wrfile}
Note: When the snapmirror.conf file is edited, SnapMirror drops to Async mode (replicates once each minute.)
Verify the status of the SnapMirror relationships:
DES> snapmirror status

Back on SRC!
Verify the status of the SnapMirror relationships:
SRC> snapmirror status
Read the snapmirror log:
SRC> rdfile /etc/log/snapmirror

Procedure 2: How to Configure SnapMirror to Support Multiple Paths

To display network interface configuration:
SRC> ifconfig -a
Read the hosts file:
SRC> rdfile /etc/hosts
Note: Each interface should have a hosts entry (source and destination) like SRC-e0a and SRC-e0b and
Clear the statistics of network interfaces e0a and e0b:
SRC> ifstat -z e0a
SRC> ifstat -z e0b

On the destination!
To display network interface configuration:
DES> ifconfig -a
Read the hosts file:
DES> rdfile /etc/hosts
Edit the snapmirror.conf file to add a connection name line:
DES> wrfile /etc/snapmirror.conf
SRC_conf = multi (SRC-e0a,DES-e0a) (SRC-e0b,DES-e0b)
SRC_conf:vol1 DES:vol1 - sync
{Ctrl C exits wrfile}
Verify the status of the SnapMirror relationships:
DES> snapmirror status

On the source!
Use ifstat to verify the data transfer is occurring on both network interfaces:
SRC> ifstat e0a
SRC> ifstat e0b

Continued …


Comments