SHIFT

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

User Tools

Site Tools


removesnapmirrorrelationship
Differences

This shows you the differences between two versions of the page.

Link to this comparison view

removesnapmirrorrelationship [2013/04/20 09:46] (current)
sjoerd created
Line 1: Line 1:
 += 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:
 +
 +<​code>​
 +snapmirror release source_volume dest_system:​dest_volume
 +</​code>​
 +
 +Example:
 +<​code>​
 +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
 +</​code>​
 +
 += Step Two: Break relationship on Target =
 +
 +Now break the relationship on the target system. Use this command:
 +
 +<​code>​
 +snapmirror break vol_name
 +</​code>​
 +
 +Example:
 +<​code>​
 +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
 +
 +</​code>​
 +
 += Step Three: Determine Snapshot Copy Basename on Target =
 +
 +Now find the name for the snapshot base the relationship is based on. Use this command:
 +
 +<​code>​
 +snapmirror status -l dest_vol
 +</​code>​
 +
 +Example:
 +<​code>​
 +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
 +</​code>​
 +
 += 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:
 +
 +<​code>​
 +snap delete dest_vol snapshot_basename
 +</​code>​
 +
 +Example:
 +<​code>​
 +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
 +</​code>​
 +
 += 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:
 +<​code>​
 +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
 +#
 +
 +
 +</​code>​
 +
 +Changes will take 2 minutes to reflect in snapmirror status on the target:
 +<​code>​
 +filer002>​ snapmirror status
 +Snapmirror is on.
 +Source ​                                    ​Destination ​                            ​State ​         Lag        Status
 +
 +</​code>​
 +
 +> Note that the source doesn'​t clean up automatically,​ I had to remove the volumes before the snapmirror status stopped showing them.
 +
 +{{tag>​storage netapp}}
removesnapmirrorrelationship.txt ยท Last modified: 2013/04/20 09:46 by sjoerd