NetApps SnapMirror document.
SnapMirror
·
This enables
you replicate the data from volume or qtree to the volume or qtree.
·
This requires a
separate license.
·
Modes of
Snapmirror
·
Asynchronous
mode :-replicates the snapshots are specified intervals
·
Synchronous
mode:- replicates the snapshots as soon as they are written to the source
·
Semi-synchronous
mode:-The destination volume lags behind the source volume by 10 Sec
·
SnapMirror can
be used either for Flex Volume and also Traditional Volume.
·
How it works
·
Files and
options involved in snapmirror ( /etc/snapmirror.conf,
snapmirror.access,/etc/snapmirror.allow)
·
It takes the
snapshot copy of the source volume and copies to the destination in the read
only mode.
·
Updates the
changes in the destination in the incremental mode. As result you get an online
read only volume or qtree.
Application of
snapmirror
·
Disaster
recovery = You can make the destination writable so clients can access the
data.
·
Disaster
recovery testing = FlexClone technology in the destination without affecting
the replication process
·
Data
restoration = you can reverse the destination and source volume or qtree and
sync the data.
·
Application
testing = you can copy the data using the snapmirror so that source data is not
disturbed.
·
Load Balancing
= you can copy the data using the snapmirror and distribute the load.
·
Off - Loading
the tape backup= you can take backup from the destination volume and offloading
the source utilization.
·
Access for
remote users.
Synchronous
SnapMirror
·
In this mode
the data is written to the destination as soon as it is written to the sourcce
filer
·
The data's can
synced either between the systems or between the system in the active/active
cluster either via ip or fcp
·
We require
separate license apart from the snapmirror license for the synchronous transfer
of data.
·
This can be
used only in the case of the volume not with the qtree's and that two the
volume should of same type.As there are two types of volume they are
Traditional volume and also FlexVol Volume.\
There are two types of synchronous modes
·
sync
·
semi-sync ( This is used for balancing between
the sync and also asynchronous mode of transfer)
·
you cannot set
both sync and semi-sync relationship
between filers of active/active configuration, and the definition has to
be done in the /etc/snapmirror.conf file.
·
Sync = The
source acknowledges the client only after the write opertation is done at both
the source and also destination and recovery point objective is almost 0
seconds.
·
Semi-sync = The
source acknowledges the client write operation immediately after it is written
in the source.The data is written to the destination with time lag of 10 sec.
This implies the recovery point objective is 10 sec which means the data of
only 10 sec would lost at the tiime recovery. Adv of it is that the performance
compared to the sync option.
·
If neither of
the two option are not specified then the it is set to asynchronous.
·
Syntax :-
systemA:volA systemB:volB – semi-sync
·
How Sync
Works:-Before the data is written to the disk the data's is written to the
NVRAM and at the consistency point the data is transferred to the disk. In the
case synchronous when the data's are written to the NVRAM the source sends the
data to the destination NVRAM's and at the consistency point the source asks
the destination to write the data to the disk and source also writes the data
to the disk, After this source waits for the acknowledgement from the
destination before it starts the next write operation
·
How it handles
network issues :- If there is any network issues then the snapmirror goes into
the asynchronous mode.Snapmirror follows the steps in the case network issues
·
snapmirror sets
the mode in the asynchronous mode.
·
In asynchronous
mode the source tries to communicate the destination with the time interval of
one minute.
·
After the
connection is re- established then the source replicates the destination
asynchronously to the destination.
·
Snapmirror then
gradually transitions replication mode from the asynchronous to synchronous
mode.
·
The transition
is possible only in the case of latest common snapshot is available otherwise
the need to break the snap(snapmirror break) and then resync it with
(snapmirror resync).
·
This can also
be overcomed with the option “replication.volume.use_auto_resync on”.The
default vaule of it is off.
·
Things to
consider before growing aggregate with synchronous snapmirror destination
volume.
·
Add minimum of
four disk.
·
New RAID group
is created with atleast four disks.
·
RAID group size
is 16 or fewer disk.
·
Tuning
snapmirror :- options snapmirror.enable on (This persist even after the reboot)
Consideration
for use of snapmirror
Pre-requisites
·
Need to enable
the license at the filers where we are going to use the snapmirror.
·
Snapmirror
volume replication requires the destination volume to be in the restricted mode
and needs to be created also.
·
The destination
filer for the snapmirror volume replication needs to be same version or the
later one comparing to the source.If you use it for DR then both filer should
be off same version.
If you are
upgrading the filer destination needs to be done before source.
·
For QSM , the
destination qtree should not be created its automatically created at the time
initialization (snapmirror initialize).
·
For QSM OnTap
version should be more than 6.2.
·
IP needs to be
resolvable in the both the ends (Source and destination).
Restrictions
·
Source volume
needs to be online.
·
Destination
needs to be more than the source or equal to that.
·
In QSM the
destination needs to be more than 5% more than the source qtree consumes.
·
In VSM the
destination volume cannot be the root volume but the source volue can root
volume.
·
In QSM.
Destination qtree can be on the root that is /etc but cannot be /etc qtree.
Point of
Caution while snapmirror\
·
Do not delete
the snapshot copies that the snapmirror creates in the source before copying to
the destination.The newely created snapshot is called NCS(Newely created
snapshot copy).Incremental copy depends upon the NCS.
·
Don't use
“snapmirror release or snapmirror break” in the destination less you don't
require the incremental changes from the source.
·
Don't take the
destination volume offline.
Recommenations
of SnapMirror
·
The schedule
time of snapmirror and also snapshot should not happen at the same time.Then
the snapshot would fail saying in the log file that already a snapshot copy is
available.
·
If the source
and destination are FlexVol Volume then there is no problem with the RAID
configuation.
Deduplication
with volume snapmirror
·
In the case
deduplication, The deduplication metadata is kept in the aggregate level
outside of the volume, so metadata is not replicated along with the volume so
in the detination the deduplication needs to be started using the “sis start -s
“( Without -s options only newly written data is scanned for the deduplication)
Destination accessability
when using CIFS with snapmirror
·
The directories
needs to be unicode format. This can be done with the following options “vol
options vol_name convert_ucode on”
Deployment of
snapMirror
·
It consists of
source volume and qrees, and destination volume and qtree .
·
Source volume
or qtree's :-These are data objects that
are need to synchronized or replicated.Normally users access these data's
object and have read write access to the data's.
·
Destination
volume or qtree's:- These are data object where the data is synchronized .
Destination volume or qtree are only read only. The destination volume needs to
be writable if we use QSM
·
The volumes can
be used for both traditional and FlexVol Volumes.
·
VSM
·
This supported
only same kind of volume either traditional volume or FlexVol Volume.
·
QSM
·
It supports
different kind volumes. i.e traditional and also FlexVol Volume.
SnapMirror commands
·
Snapmirror on ( Use to
enable the snapmirror, Between snapmirror on and snapmirror off command you
need wait for 60 seconds for proper transfer of controls)
·
To enable you
can also use options snapmirror.enable on
·
vol create and
vol restrict (To create destination volume snapmirror)
·
snapmirror initialize (Used to start the initial transfer of
snapshot(Baseline copy) from the source to destination .
·
snapmirror status (view the status of the snapmirror)
·
snapmirror update (Manually updating the snapmirror destination )
·
snapmirror quiesce (Stabilize the contents of the destination volume before snapshot is
taken, and allowing the active snapmirror transfer to finish and temporarily
preventing the new transfers).
·
Snapmirror resume (Resume the normal transfer after quiesce).
·
Snapmirror abort (Stopping the active snapmirror)
·
Snapmirror break (Used to break the relationship between the source and the destination
volume and convert the volume in writable volume or qtree)
·
Snapmirror resync (Reestablish the relationship between the source and destination volume
, This command is generally issued after the “snapmirror break” so that we
avoid the initial transfer which is the baseline copy)
·
Snapmirror release (The snapshot copies are deleted)
·
Snapmirror off (Turn off the snapmirror functionality) alternatively options
snapmirror.enable off
·
Snapmirror store and snapmirror use(Copy the volume to the local tape, and continue the same on subsequent tapes).
·
Snapmirror retrive and snapmirror use (Initial or restore the volume from the local tape)
·
Snapmirror destination (Used in the case of cascading the snapmirror
destination )
Snapmirror
options
·
Snapmirro.enable
on|off ( Default is off)
·
Snapmirror.access
host=list(list is hostnames separated by comma)(Default = legacy this means the
access depends upon the list of hostnames available in
/etc/snapmirror.allow)(If both options and /etc/snapmirror.allow are used then
options takes precedence)
·
Snapmirror.log.enable
on|off(Whether the snapmirror activity is being logged /etc/log/snapmirror.x
files (Default on)
·
Replication.volume.use_auto_resync
on|off (specifies automatic re-synchronisation for synchronous snapmirror
relationship) (Default off)
·
Replication.volume.reserved_transfers
n (Specifies the number of reserved transfers for the snapmirror volumes and n
is the number of times and it depends upon the system model default is 0)
·
Replication.logical.reserved_transfers
n (specifies the number of reserved transfers for snapvault and snapmirror
qtrees where n is the number of times and default is 0).
·
Replication.volume.transfer_limits
{current|previous}(Specifies the maximum number of transfers the volume
snapmirror can run concurrently)(Default is current)(Current is set as 7.3.x
limit and previous is set as 7.2.x limit)
·
Replication.logical.transfer_limits
{current|previous}(Specifies the maximum number of transfers the qtree
snapmirror and snapvault can run
concurrently)(Default is current)(Current is set as 7.3.x limit and previous is
set as 7.2.x limit)
Snapmirror
files:-
·
/etc/snapmirror.conf
( They are used to specify the relationship between the source and the
destination along with the following
·
Snapmirror
update schedule for relationship
·
Type of
relationship (single, multipath or failover)
·
Other options
·
/etc/snapmirror.allow
( Specifies the snapmirror destination that are allowed to copy from the
system)
·
/etc/log/snapmirror
( Latest the snapmirror and the older ones are snapmirror.0 snapmirror.1)
·
/etc/hosts(
Used for resolving the host names)
Setting up a
basic snapmirror operation:-
·
License need to
be enabled in the source and also destination filer.
·
Need to specify
the destination systems name on the source filer in the /etc/snapmirror.allow
·
If the source
volume contains the directories that are being accessed by clients then the
volume needs to be changed to the Unicode format before the replication.
STEPS:-
·
license add
snapmirror_license_code
·
s_systemA>options
snapmirror.access host=d_systemA
·
In the
destination /etc/snapmirror.allow “s_systemA:vol0 d_systemA:vol1 kbs=200,restart=always
15 * * 1,2,3,4,5” and “s_systemA:vol0 d_systemA:vol1 – sync”
·
In both source
and destination the “snapmirror on”
needs to be given.
·
VSM :-
“d_systemA>snapmirror initialize –S systemA:vol0 systemB:vol2”
·
QSM:-
“d_systemA>snapmirror initialize –S systemA:/vol0/vol1/qtree4
systemB:/vol2/vol1/qtree4”
Firewall usage
with snapmirror:-
·
They use
socket/bind/listen/accept sequence on the TCP socket.
·
Snapmirror
source is binded to the 10566 port number. Synchronous snapmirror requires
extra one more port which is 10569. Destination listens on the
10565,10567,10578.
·
So ports
between 10565 to 10569 needs to opened.
With Regards,
Santhosh Kumar R