Continuing from
Part 2...
8) SnapMirror
Policies
Run these commands from the Clustershell ::>
rows
0
set
-showseparator "#"
set
-showallfields true
snapmirror
policy show -policy !DPDefault,!XDPDefault
Copy and paste into Excel using the ‘Text Import Wizard’
and # as a delimiter.
SnapMirror policies must have at least one rule, and at
most 10 rules. To construct via the Clustershell requires two commands:
::>
snapmirror policy create -vserver {vserver name} -policy {snapmirror policy}
-comment {text} -tries {integer|unlimited} -transfer-priority {low|normal}
-ignore-atime {true|false} -restart {always|never|default}
::>
snapmirror policy add-rule -vserver {vserver name} -policy {snapmirror policy} -snapmirror-label
{text} -keep {text} -preserve {true|false} -warn {integer}
This Excel formula will generate the SnapMirror Policy
Create command:
=CONCATENATE("snapmirror
policy create -vserver ",A3," -policy ",B3," -comment
","""",D3,""""," -tries
",E3," -transfer-priority ",F3," -ignore-atime
",G3," -restart ",H3)
Then, taking the data from columns I,J,K, and L, and using
the following methods and formula will create the rules:
1) Data Tab > Text to Columns (using , as the
delimiter)
2) Copy > Paste > Transpose
=CONCATENATE("snapmirror
policy add-rule -vserver ",$A$3," -policy ",$B$3,"
-snapmirror-label ",A7," -keep ",B7," -preserve
",C7," -warn ",D7)
Note: The above
process needs improvement, and if you only have one SnapMirror Policy it’s
straightforward to do this manually.
9) SnapMirrors
Note: The document
does not detail adding SnapMirror/SnapVault licensing, creating intercluster
LIFs, Cluster peering, SVM peering, and configuring options snapmirror.access
(7-Mode)
Run these commands from the Clustershell ::>
rows
0
set
-showseparator "#"
set
-showallfields true
snapmirror
show -type !LS,!RST
Copy and paste into Excel using the ‘Text Import Wizard’
and # as a delimiter.
The following is the Clustershell syntax to be created
::>
snapmirror
create -source-path {Source Path} -source-cluster {Source Cluster}
-source-vserver {Source Vserver} -source-volume {Source Volume}
-destination-path {Destination Path} -destination-cluster {Destination Cluster}
-destination-vserver {Destination Vserver} -destination-volume {Destination
Volume} -type {Relationship Type} -vserver {Managing Vserver} -schedule
{SnapMirror Schedule} -policy {SnapMirror Policy} -tries {Tries Limit}
-throttle {Throttle (KB/sec)}
The Excel formula to generate the commands:
=CONCATENATE("snapmirror
create -source-path ",A3," -destination-path ",E3," -type
",I3," -schedule ",K3," -policy
",L3,IF(M3<>"-",CONCATENATE(" -tries
",M3),"")," -throttle ",N3)
10) Starting the
SnapMirrors
The beauty about Clustered ONTAP command line is how easy
it is to wildcard commands ::>
snapmirror
initialize *
Comments
Post a Comment