Introduction
There is a vserver
delete command in the Clustershell, but it quite rightly blocks you from
destroying the Vserver until you’ve done certain things. The following post
takes as an example, a fairly well developed lab SVM, and walks through the
steps to dismantling it. This information is useful for tidying up test/lab
SVM(s).
Example SVM
We have a cluster called NACLU1 with an SVM called NASVM1.
NASVM1 is a fairly well developed SVM - it’s got:
i) A Domain Tunnel for Active Directory Authentication
security login domain-tunnel show
ii) Some DP and XDP SnapMirrors going to other clusters
snapmirror list-destinations -source-vserver
NASVM1
iii) Is a destination for some DP SnapMirrors, and also
has LS SnapMirrors of its rootvol
snapmirror show -destination-vserver NASVM1
iv) Vserver peers
vserver peer show
v) Vserver transition peers
vserver peer transition show
vi) Mounted Volumes
vol show -vserver NASVM1 -fields
junction-path
vii) A number of volumes
vol show -vserver NASVM1
viii) Has a running CIFS server
vserver cifs show -vserver NASVM1
Step by Step - Destroying the SVM
1) Domain Tunnel
NACLU1::> security login domain-tunnel show
NACLU1::> security login domain-tunnel delete
2) SnapMirror
Destinations
NACLU1::> snapmirror list-destinations
-source-vserver NASVM1
NACLU1::> snapmirror release -destination-path
DEST-SVM:DEST-VOL
Repeat until have released all SnapMirror destinations
for NASVM1
3) SnapMirror
Delete
NACLU1::> snapmirror show -destination-vserver NASVM1
NACLU1::> snapmirror delete -destination-path
NASVM1:VOL-NAME
Repeat until have deleted all SnapMirror destinations to
NASVM1 (including LS Mirrors)
4) Vserver Peers
NACLU1::> vserver peer show -vserver NASVM1
NACLU1::> vserver peer delete -vserver NASVM1
-peer-vserver PEER-SVM
Repeat until all Peer SVMs have been deleted.
Note: You might
need to force delete the Vserver peers.
NACLU1::> vserver peer delete -vserver
NASVM1 -peer-vserver PEER-SVM -force true
5) Vserver
Transition Peers
NACLU1::> vserver peer transition show -local-vserver
NASVM1
NACLU1::> vserver peer transition delete
-local-vserver NASVM1 -src-filer-name SRC-7-FILER
Repeat until all Transition Peers have been deleted.
6) Mounted Volumes
(with Junction Paths)
NACLU1::> vol show -vserver NASVM1 -fields
junction-path
NACLU1::> vol unmount -vserver NASVM1 -volume
VOL-NAME
Repeat until all volumes have been unmounted.
Note:
Unsurprisingly, cannot unmount the rootvol
7) Volumes
NACLU1::> vol show -vserver NASVM1 -state online
NACLU1::> vol offline -vserver NASVM1 -volume
VOL-NAME
Repeat until all volumes have been offlined (including
the rootvol.)
NACLU1::> vol show -vserver NASVM1
NACLU1::> vserver show -vserver NASVM1 -fields
rootvolume
NACLU1::> vol destroy -vserver NASVM1 -volume
VOL-NAME
Repeat until all the volumes have been destroyed leaving
the rootvol until the last.
8) CIFS Server
NACLU1::> vserver cifs show -vserver NASVM1
NACLU1::> cifs delete -vserver NASVM1
Note: If your
account only has the Minimal Active Directory Permission for
Domain Join, the cifs delete will
work and won’t delete the Computer Account from Active Directory (a
domain admin account will delete the Computer Account.)
9) Vserver
NACLU1::> vserver delete -vserver NASVM1
THE END
Comments
Post a Comment