You are on page 1of 4

Snapmirror is an licensed utility in Netapp to do data transfer across filers.

S
napmirror works at Volume level or Qtree level. Snapmirror is mainly used for di
saster recovery and replication.
Snapmirrror needs a source and destination filer. (When source and destination a
re the same filer, the snapmirror happens on local filer itself. This is when y
ou have to replicate volumes inside a filer. If you need DR capabilities of a vo
lume inside a filer, you have to try syncmirror ).
Synchronous SnapMirror is a SnapMirror feature in which the data on one system i
s replicated on another system at, or near, the same time it is written to the f
irst system. Synchronous SnapMirror synchronously replicates data between single
or clustered storage systems situated at remote sites using either an IP or a F
ibre Channel connection. Before Data ONTAP saves data to disk, it collects writt
en data in NVRAM. Then, at a point in time called a consistency point, it sends
the data to disk. When the Synchronous SnapMirror feature is enabled, the sourc
e system forwards data to the destination system as it is written in NVRAM. Then
, at the consistency point, the source system sends its data to disk and tells t
he destination system to also send its data to disk.
This guides you quickly through the Snapmirror setup and commands.
1) Enable Snapmirror on source and destination filer
source-filer> options snapmirror.enable
snapmirror.enable
on
source-filer>
source-filer> options snapmirror.access
snapmirror.access
legacy
source-filer>
1
2
3
4
5
6
source-filer> options snapmirror.enable
snapmirror.enable
on
source-filer>
source-filer> options snapmirror.access
snapmirror.access
legacy
source-filer>
2) Snapmirror Access
Make sure destination filer has snapmirror access to the source filer. The snapm
irror filer s name or IP address should be in /etc/snapmirror.allow. Use wrfile to
add entries to /etc/snapmirror.allow.
source-filer> rdfile /etc/snapmirror.allow
destination-filer
destination-filer2
source-filer>
1
2
3
4

source-filer> rdfile /etc/snapmirror.allow


destination-filer
destination-filer2
source-filer>
3) Initializing a Snapmirror relation
Volume snapmirror : Create a destination volume on destination netapp filer, of
same size as source volume or greater size. For volume snapmirror, the destinati
on volume should be in restricted mode. For example, let us consider we are snap
mirroring a 100G volume
we create the destination volume and make it restricted.
destination-filer> vol create demo_destination aggr01 100G
destination-filer> vol restrict demo_destination
1
2
destination-filer> vol create demo_destination aggr01 100G
destination-filer> vol restrict demo_destination
Volume SnapMirror creates a Snapshot copy before performing the initial transfe
r. This copy is referred to as the baseline Snapshot copy. After performing an i
nitial transfer of all data in the volume, VSM (Volume SnapMirror) sends to the
destination only the blocks that have changed since the last successful replicat
ion. When SnapMirror performs an update transfer, it creates another new Snapsho
t copy and compares the changed blocks. These changed blocks are sent as part of
the update transfer.
Snapmirror is always destination filer driven. So the snapmirror initialize has
to be done on destination filer. The below command starts the baseline transfer.
destination-filer> snapmirror initialize -S source-filer:demo_source destinat
ion-filer:demo_destination
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.
destination-filer>
1
2
3
4
destination-filer> snapmirror initialize -S source-filer:demo_source destinat
ion-filer:demo_destination
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.
destination-filer>
Qtree Snapmirror : For qtree snapmirror, you should not create the destination q
tree. The snapmirror command automatically creates the destination qtree. So jus
t volume creation of required size is good enough. Qtree SnapMirror determines c
hanged data by first looking through the inode file for inodes that have changed
and changed inodes of the interesting qtree for changed data blocks. The SnapMi
rror software then transfers only the new or changed data blocks from this Snaps
hot copy that is associated with the designated qtree. On the destination volume
, a new Snapshot copy is then created that contains a complete point-in-time cop
y of the entire destination volume, but that is associated specifically with the
particular qtree that has been replicated.
destination-filer> snapmirror initialize -S source-filer:/vol/demo1/qtree des
tination-filer:/vol/demo1/qtree

Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.
1
2
3
destination-filer> snapmirror initialize -S source-filer:/vol/demo1/qtree des
tination-filer:/vol/demo1/qtree
Transfer started.
Monitor progress with 'snapmirror status' or the snapmirror log.
4) Monitoring the status : Snapmirror data transfer status can be monitored eith
er from source or destination filer. Use snapmirror status to check the status.
destination-filer> snapmirror status
Snapmirror is on.
Source
Destination
Lag Status
source-filer:demo_source
destination-filer:demo_destination
ed - Transferring (1690 MB done)
source-filer:/vol/demo1/qtree destination-filer:/vol/demo1/qtree
ed - Transferring (32 MB done)
destination-filer>
1
2
3
4
5
6
destination-filer> snapmirror status
Snapmirror is on.
Source
Destination
Lag Status
source-filer:demo_source
destination-filer:demo_destination
ed - Transferring (1690 MB done)
source-filer:/vol/demo1/qtree destination-filer:/vol/demo1/qtree
ed - Transferring (32 MB done)
destination-filer>

State
Uninitializ
Uninitializ

State
Uninitializ
Uninitializ

5) Snapmirror schedule : This is the schedule used by the destination filer for
updating the mirror. It informs the SnapMirror scheduler when transfers will be
initiated. The schedule field can either contain the word sync to specify synchr
onous mirroring or a cron-style specification of when to update the mirror. The
cronstyle schedule contains four space-separated fields.
If you want to sync the data on a scheduled frequency, you can set that in desti
nation filer s /etc/snapmirror.conf . The time settings are similar to Unix cron.
You can set a synchronous snapmirror schedule in /etc/snapmirror.conf by adding s
ync instead of the cron style frequency.
destination-filer> rdfile /etc/snapmirror.conf
source-filer:demo_source
destination-filer:demo_destination - 0 * * * #
This syncs every hour
source-filer:/vol/demo1/qtree destination-filer:/vol/demo1/qtree - 0 21 * * #
This syncs every 9:00 pm
destination-filer>
1
2
3

4
destination-filer> rdfile /etc/snapmirror.conf
source-filer:demo_source
destination-filer:demo_destination - 0 * * * #
This syncs every hour
source-filer:/vol/demo1/qtree destination-filer:/vol/demo1/qtree - 0 21 * * #
This syncs every 9:00 pm
destination-filer>
6) Other Snapmirror commands
To
To
To
To

break snapmirror relation


do snapmirror quiesce and snapmirror break.
update snapmirror data
do snapmirror update
resync a broken relation
do snapmirror resync.
abort a relation do snapmirror abort

Snapmirror do provide multipath support. More than one physical path between a s
ource and a destination system might be desired for a mirror relationship. Multi
path support allows SnapMirror traffic to be load balanced between these paths a
nd provides for failover in the event of a network outage.

You might also like