SHIFT-WIKI

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


removesnapmirrorrelationship

Remove Snapmirror Relationship

This is an example on removing a snapmirror relationship. The relationship that will be removed is:

Source:

  • DATA_VOLUME

Step One: Release Relationship from Source

Release the snapmirror relationship on the source system so the source can delete it's base snapsnot. Use this command:

snapmirror release source_volume dest_system:dest_volume

Example:

filer001> snapmirror status
Snapmirror is on.
Source                                   Destination                             State          Lag        Status
filer001:DATA_VOLUME                     filer002:DATA_VOLUME  Source         00:00:44   Idle

filer001> snapmirror release DATA_VOLUME filer002:DATA_VOLUME

filer001> snapmirror status
Snapmirror is on.
Source                                   Destination                             State          Lag        Status
filer001:DATA_VOLUME                     filer002:DATA_VOLUME  Source         -          Idle

Step Two: Break relationship on Target

Now break the relationship on the target system. Use this command:

snapmirror break vol_name

Example:

filer002> snapmirror status
Snapmirror is on.
Source                                     Destination                             State          Lag        Status
filer001:DATA_VOLUME                       filer002:DATA_VOLUME  Snapmirrored   00:02:20   Pending

filer002> snapmirror break DATA_VOLUME
snapmirror break: Destination DATA_VOLUME is now writable.
Volume size is being retained for potential snapmirror resync.  If you would like to grow the volume and do not expect to resync, set vol option fs_size_fixed to off.

filer002> snapmirror status
Snapmirror is on.
Source                                     Destination                             State          Lag        Status
filer001:DATA_VOLUME                       filer002:DATA_VOLUME  Broken-off     00:05:25   Idle

Step Three: Determine Snapshot Copy Basename on Target

Now find the name for the snapshot base the relationship is based on. Use this command:

snapmirror status -l dest_vol

Example:

filer002> snapmirror status -l DATA_VOLUME
Snapmirror is on.

Source:                 filer001:DATA_VOLUME
Destination:            filer002:DATA_VOLUME
Status:                 Idle
Progress:               -
State:                  Broken-off
Lag:                    01:52:53
Mirror Timestamp:       Fri Sep  7 11:24:05 CEST 2012
Base Snapshot:          filer002(0151702878)_DATA_VOLUME.587187
Current Transfer Type:  Scheduled
Current Transfer Error: destination is not in snapmirrored state
Contents:               Replica
Last Transfer Type:     Scheduled
Last Transfer Size:     11744 KB
Last Transfer Duration: 00:00:30
Last Transfer From:     filer001:DATA_VOLUME

Step Four: Delete the Snapshot Copy on Target

Now delete the snapshot you've found. Without it the relationship will enter its uninitialized state. Use this command:

snap delete dest_vol snapshot_basename

Example:

filer002> snap delete DATA_VOLUME filer002(0151702878)_DATA_VOLUME.587187

filer002> snapmirror status
Snapmirror is on.
Source                                     Destination                             State          Lag        Status
filer001:DATA_VOLUME                       filer002:DATA_VOLUME  Uninitialized  01:55:21   Idle

Step Five: Remove the Relationship From the Snapmirror.conf on Target

Use rdfile and wrfile to remove the snapmirror relationship. Note that you need a blank line at the end of the file when creating a file using wrfile.

Example:

filer002> rdfile /etc/snapmirror.conf
#Regenerated by registry Thu Apr 26 09:17:46 GMT 2012

# Exchange Mirror
filer001:DATA_VOLUME filer002:DATA_VOLUME - * * * *


filer002> wrfile /etc/snapmirror.conf
#Regenerated by registry Thu Apr 26 09:17:46 GMT 2012
#

Changes will take 2 minutes to reflect in snapmirror status on the target:

filer002> snapmirror status
Snapmirror is on.
Source                                     Destination                             State          Lag        Status
Note that the source doesn't clean up automatically, I had to remove the volumes before the snapmirror status stopped showing them.
removesnapmirrorrelationship.txt · Last modified: 2021/09/24 00:25 by 127.0.0.1