This
5 part posting is a very rough and ready CLI crib sheet for Clustered ONTAP.
The
version of CDOT here is 8.1.1 / 8.1.2.
11: DATA PROTECTION
> volume snapshot
restore ?
> snapmirror
promote ?
> volume snapshot
promote ?
> volume snapshow
-vserver vs7 -volume vs7_vol1
> volume move ?
> volume copy ?
> snapmirror ?
Mirror
Creation Steps:
1. volume create
2. snapmirror create
3. (DP Mirror) snapmirror initialize
3. (LS Mirror) snapmirror
initialize-ls-set
4. (DP Mirror) snapmirror update
4. (LS Mirror) snapmirror update-ls-set
> snapmirror show
> snapmirror show
-source-volume vs2root -type ls -instance
Clients
are transparently directed to a load-sharing mirror copy for read operations
rather than to the read/write volume, unless the special “.admin” path is used.
> vol snap show
-vserver vs2 -volume vs2root
SNAPMIRROR
DATA PROTECTION
Create
Volume for Mirror (on DR Vserver):
> volume create -vserver
vserver -volume datavolume_dp -aggr aggrname -size equal_to_datavolume_A_size -type
dp
Create
Mirror (from DR site):
> snapmirror
create -destination-path DR://vserver/datavolume_dp -source-path
PRI://vserver/datavolume_A
Initialize
Mirror - Baseline Transfer (from DR site):
> snapmirror
initialize -destination-path DR://vserver/datavolume_dp -source-path
PRI://vserver/datavolume_A
Update
Mirror - Incremental Transfers (from DR site):
> snapmirror
update -destination-path DR://vserver/datavolume_dp -source-path
PRI://vserver/datavolume_A
Break
Mirror (from DR) - Make destination writeable:
> snapmirror
break -destination-path DR://vserver/datavolume_dp -source-path
PRI://vserver/datavolume_A
Resync
Mirror (From DR) - Resume relationship:
> snapmirror
resync -destination-path DR://vserver/datavolume_dp -source-path
PRI://vserver/datavolume_A
Delete
Mirror (From DR) - Remove Relationship:
> snapmirror
delete -destination-path DR://vserver/datavolume_dp -source-path
PRI://vserver/datavolume_A
Create
a new relationship with DR as source:
> snapmirror
create -destination-path PRI://vserver/datavolume_A -source-path
DR://vserver/datavolume_dp
Resync
the mirror (From DR):
> snapmirror
resync -destination-path PRI://vserver/datavolume_A -source-path
DR://vserver/datavolume_dp
Steps
to Resume Original Mirror:
1. Redirect clients
2. Update mirrored volumes using snapmirror
update
3. Break the mirror using snapmirror
break
4. Delete the mirror using snapmirror
delete
5. Recreate an original relationship
using snapmirror
create (Dest:DR - Source:Primary)
6. Resync from DR site using snapmirror resync (no re-baseline required)
JOB
SCHEDULES
> job schedule
show
SNAPSHOT
POLICIES
> volume snapshot
policy show
CONFIGURING
FOR NDMP
> system services
ndmp modify
> system node
hardware tape drive show
> system node
hardware tape library show
EXAMPLE 11.1: CREATE AND
INITIALIZE LS AND DP SNAPMIRROR REPLICATIONS
> volume create
-vserver vs2 -volume vs2_root_ls1 -aggr n01_aggr1 -type dp
Note:
An LS mirror must be created as a DP mirror and then changed.
> snapmirror
create -source-cluster clusa -source-vserver vs2 -source-volume vs2_root
-destination-cluster clusa -destination-vserver vs2 -destination-volume
vs2_root_ls1 -type ls
> vol create
-vserver vs2 -vol vs2_root_ls2 -aggr n02_aggr1 -type dp
> snapmirror
create -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_ls2
-type ls
> snapmirror show
> snapmirror show
-instance
Perform
initial (baseline) replication:
> snapmirror
initialize-ls-set -source-path clusa://vs2/vs2_root
> snapmirror show
Create
two DP mirrors:
> volume create
-vserver vs2 -volume vs2_root_dp1 -aggr n01_aggr1 -type dp
> volume create
-vserver vs2 -volume vs2_root_dp2 -aggr n02_aggr1 -type dp
Establish
DP mirror relationships:
> snapmirror
create -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_dp1
-type dp
> snapmirror
create -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_dp2
-type dp
Perform
initial (baseline) replication to one of the DP mirrors:
> snapmirror
initialize -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_dp1
> volume snapshot
show -vserver vs2 -volume vs2_root
> snapmirror show
-inst
EXAMPLE 11.2: COMPARE DP
MIRROR REPLICATION TIMES
> snapmirror
initialize -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_dp2
-foreground true
> snapmirror show
-inst
> volume snapshot
show -vserver vs2 -volume vs2_root
> snapmirror
update -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_dp*
-foreground true
> snapmirror show
-inst
> volume snapshot
show -vserver vs2 -volume vs2_root
EXAMPLE 11.3: ADD VOLUMES
AND FILES TO A REPLICATED NAMESPACE
> volume create
-vserver vs2 -volume vs2_vol03 -aggr n01_aggr1 -junction-path /vs2vol3
Linux
NFS client:
cd /mnt/vs2
ls
Cluster
Shell:
> snapmirror
update-ls-set -source-path clusa://vs2/vs2_root
Linux
NFS client:
ls /mnt/vs2
touch /mnt/vs2/myfile
mkdir /mnt/vs2rw
mount X.X.X.X:/.admin
/mnt/vs2rw
touch /mnt/vs2rw/myfile
ls /mnt/vs2rw/myfile
ls /mnt/vs2/myfile
Cluster
Shell:
snapmirror update-ls-set
-source-path clusa://vs2/vs2_root -foreground true
Linux
NFS client:
ls /mnt/vs2/myfile
EXAMPLE 11.4: SCHEDULE
PERIODIC SNAPMIRROR REPLICATIONS
> job schedule
show
> snapmirror
modify -destination-path clusa://vs2/vs2_root/ls1 -schedule 5min
> snapmirror show
-destination-path clusa://vs2/vs2_root_ls* -instance
> snapmirror
modify -destination-path clusa://vs2/vs2_root_dp1 -schedule hourly
> snapmirror show
-instance
> system date
show
> snapmirror show
-instance
EXAMPLE 11.5: PROMOTE AN LS
MIRROR
> volume show
-volume vs2_root*
> snapmirror
promote -source-path clusa://vs2/vs2_root -destination-path clusa://vs2/vs2_root_ls1
> volume show
-volume vs2_root*
> snapmirror show
> snapmirror
update-ls-set -source-path clusa://vs2/vs2_root_ls1 -foreground true
EXAMPLE 11.6: SET UP AN
INTERCLUSTER PEER RELATIONSHIP
Create
an aggregate on each node:
> aggr create
-aggr aggr1 -diskcount 6 -nodes other-01
> aggr create
-aggr aggr2 -diskcount 6 -nodes other-02
Change
the roles of ports e0e to intercluster:
> net port show
> net port modify
-node other-01 -port e0e -role intercluster
> net port modify
-node other-02 -port e0e -role intercluster
> net port show
Create
intercluster LIFs on the “other” cluster:
> net int create
-vserver other-01 -lif o1_ic1 -role intercluster -home-node other-01 -home-port
e0e -address X.X.X.X -netmask X.X.X.X
> net int create
-vserver other-02 -lif o2_ic1 -role intercluster -home-node other-02 -home-port
e0e -address X.X.X.X -netmask X.X.X.X
> net int show
Note:
intercluster LIFs are associated with node Vservers rather than cluster
Vservers.
On
clusa cluster:
> net port show
> net port modify
-node clusa-01 -port e0e -role intercluster
> net port modify
-node clusa-02 -port e0e -role intercluster
> net port show
Create
an intercluster LIF:
> net int create
-vserver clusa-01 -lif n1_ic1 -role intercluster -home-node clusa-01 -home-port
e0e -address X.X.X.X -netmask X.X.X.X
> net int create
-vserver clusa-02 -lif n2_ic1 -role intercluster -home-node clusa-02 -home-port
e0e -address X.X.X.X -netmask X.X.X.X
> net int show
Verify
routing groups for the intercluster LIFs on both clusters:
> network
routing-groups show
Verify
failover redundancy for the interclusters LIFs on both clusters:
> net int show
-role intercluster -failover
Verify
the peer relationship:
> cluster peer
show
> cluster peer
health show
> cluster peer
ping
EXAMPLE 11.7: USE THE CLI
TO CONFIGURE A SNAPMIRROR RELATIONSHIP
> vol create
-vserver vs9 -volume vs2_vol02 -aggr aggr2 -size 410mb -type dp
Note:
The size of the destination volume must be equal to or greater than the source
volume.
> snapmirror
create -source-path clusa://vs2/vs2_vol01 -destination-path
other://vs9/vs2_vol02 -type dp -schedule daily
> snapmirror
initialize -destination-path other://vs9/vs2_vol02 -foreground true
Comments
Post a Comment