| Advertise on warmetal.nl! Click for more information about advertising here. |
Did you find this website useful? Did I save you a lot of time? |
|
This article describes how to setup replication between two filers using SnapMirror. Configuring this is pretty forward, but there is a big catch, which will never show by error messages: ALWAYS USE HOSTNAMES! I had several issues when using IP-addresses or when mixing IP-addresses and hostnames. Also, in a simulated environment use different names for the volumes. That's only in a simulated environment, in my production environment I had no issues while using the same names for the volumes. This was confirmed while googling for the error.
Restricting the volume is also possible from the command line:
storage02> vol restrict target Share mirrortarget disabled while volume target is offline. Volume 'target' is now restricted.
Note that you can configure access also through the file /etc/snapmirror.allow or options.snapmirror.access
Throttling the replications to prevent congestion on the network can be done using the replication options. To show the replication options issue this command:
filer1> options replication replication.logical.reserved_transfers 0 (value might be overwritten in takeover) replication.logical.transfer_limits current (value might be overwritten in takeover) replication.throttle.enable on replication.throttle.incoming.max_kbs 35840 replication.throttle.outgoing.max_kbs 35840 replication.volume.reserved_transfers 0 (value might be overwritten in takeover) replication.volume.transfer_limits current (value might be overwritten in takeover) replication.volume.use_auto_resync off (value might be overwritten in takeover)
You can change one of the options like this:
options replication.throttle.enable on options replication.throttle.incoming.max_kbs 35840 options replication.throttle.outgoing.max_kbs 35840
When the creation was successful, click on advanced to see the details of the SnapMirror relation and start the initialization.
If you experience problems or just want to check if the configuration you entered is correctly accepted at the system I'd start checking the snapmirror.conf file:
acc-filer1> rdfile /etc/snapmirror.conf #Regenerated by registry Mon Apr 11 13:28:39 GMT 2011 prd-filer1:database acc-filer1:database - 0-59/6 * * * prd-filer1:WEB acc-filer1:WEB - 0-59/6 * * *
It shows a quick overview of the source, target and schedule. The above schedule means replication is run every 6 minutes.
Checking mirror status:
See the status when the volumes are replicated: filer1> snapmirror status Snapmirror is on. Source Destination State Lag Status prd-filer1:vol1 acc-filer1:vol1 Snapmirrored 00:41:00 Idle prd-filer1:vol2 acc-filer1:vol2 Snapmirrored 00:10:58 Idle See the status when the volumes are still being transferred: filer2*> snapmirror status Snapmirror is on. Source Destination State Lag Status prd-filer2:vol1 acc-filer2:vol1 Uninitialized - Transferring (334 GB done)
Checking network traffic:
sysstat -s 1
Stop replication after the current transfer has finished:
snapmirror quiesce filer1:volumename
Stop replication immediately:
snapmirror abort filer1:volumename
Stop replication and r/w enable the destination:
snapmirror break filer1:volumename
Continue replication after abort/stop/quiesce:
snapmirror resync filer1:volumename
I created a separate article for this, it turned out to be big.
Discussion