Following on from recent posts on the NetApp Virtual Storage Console 4.1 for VMware using NFS datastores, here we look at setting up and integrating SnapMirror with SMVI (SnapManager for Virtual Infrastructure has been bundled with the VSC from 4.x.)
VSC and SnapMirror
The VSC integrates SnapMirror via the backup job option ‘Initiate SnapMirror update’.
Image: VSC 4.1 B&R - Job Properties
For this to work, a SnapMirror relationship must already exist, and below details how to do this.
How to Create an Asynchronous Volume SnapMirror Relationship (Data ONTAP 7-Mode)
IMPORTANT NOTE: The VSC will update the SnapMirror for us if ‘Initiate SnapMirror update’ is ticked. Step 5 is only required if you want SnapMirror updates outside of the control of the VSC.
SRCE> license add SNAPMIRROR_CODE
DEST> license add SNAPMIRROR_CODE
2. Check source volume size and verify status:
SRCE> df -k SOURCE_VOL
SRCE> vol status SOURCE_VOL
*For completeness (not required when setting up SnapMirror for NFS volumes) - if our source volume supported CIFS clients, we would ensure that Unicode is set to ON using:
vol options SOURCE_VOL convert_ucode on
3. Create the destination volume (must be equal or larger to the source), double-check the size is correct, verify volume options, restrict the volume, and verify status=restricted:
DEST> vol create DEST_VOL -s none AGGREGATE SIZE
*(Optional) the -s none creates a thin-provisioned volume
DEST> df -k DEST_VOL
DEST> vol status DEST_VOL
*(Optional) here you might want to compare volume options from the source
DEST> vol restrict DEST_VOL
DEST> vol status DEST_VOL
4. Allow SnapMirror access between the storage controllers, and ping to verify network connectivity:
SRCE> options snapmirror.access host=DEST
DEST> options snapmirror.access host=SRCE
SRCE> ping DEST
DEST> ping SRCE
5. (Optional) Create SnapMirror schedule on the destination (remember that in 7-Mode it is a “pull” relationship) defining when to synchronize (Minute of Hour, Hour of Day, Day of Month, Day of Week):
DEST> wrfile -a /etc/snapmirror.conf
SRCE:SOURCE_VOL DEST:DEST_VOL - * * * *
6. Enable SnapMirror on source and destination systems:
SRCE> snapmirror on
DEST> snapmirror on
7. Initialize transfer of files from source to destination:
IMPORTANT NOTE: Suspend the VSC backup job before initializing the SnapMirror relationship!
DEST> snapmirror initialize -S SRCE:SOURCE_VOL DEST:DEST_VOL
*Remember hostnames are case sensitive
8. Verify transfer/mirror status:
DEST> snapmirror status -l
When the state is Initialized, we’re good to edit the backup job and tick the ‘Initiate SnapMirror update’ box, and Resume the backup job.
SnapMirror Considerations with the VSC
It is recommended to backup all VMs in a datastore. If there are individual backup jobs for VMs in a datastore, each individual backup job requires a volume snapshot, and if all the jobs have update SnapMirror ticked, then a full volume SnapMirror update is run after each individual VM is backed up.
Volume Options for an NFS Datastore Created via the VSC 4.1 with ‘Thin provision’ Ticked and ‘Auto-grow’ Unticked
Image: VSC 4.1 NFS Datastore Provisioning
> vol status CREATEDBYVSC
Volume State Status
CREATEDBYVSC online raid_dp, flex
nosnap=on, no_atime_update=on, guarantee=none, fractional_reserve=0
Volume UUID: 85c90f14-af44-11e2-b902-123478563412
Containing aggregate: 'aggr0'