Sunday, April 27, 2014

Storage Reclaim ( Celerra & VMAX ) scripts

Celerra:

delete_share document contains all the share names that needs to be removed.  Do all verification carefully before doing reclaims.


1) Verify if there are any active connections to Celerra from client
     Server_netstat server_2
     Look after cifs and nfs connections
     Make sure associate connections will be cleared before reclaim starts

2) Delete exports
    for i in `cat delete_share`; do echo $i; server_export server_2 -unexport -perm $i; done

3) Remove replications if any exists
    nas_replicate -list
    nas_replicate -delete replication_name -mode both/source/destination

4) Unmount file systems
     for i in `cat delete_share`; do echo $i; server_umount server_2 -perm /$i

5) Delete mount points
    for i in `cat delete_mountpoint`; do echo $i; server_mountpoint server_2 -delete /$i; done

6) Delete File systems
    for i in `cat delete_fs`; do echo $i; nas_fs -delete $i

7) Delete Luns from VG8
    for i in `cat delete_luns`; do echo $i; nas_disk -delete device_name -perm
    ** make sure device status in use to false **
    nas_disk -list



1) Delete all filesystems used by VDM
2) Remove VDM
3) Remove file systems not associated with a VDM
4) nas_disk -d to remove all d# disks other than the control luna
5) remove LUNs from storage group of symm channel


VMAX

Reclaiming Storage - VMAX

1. Get the list of thin devices bound in the NAS pool:
symcfg -sid xx show -pool poolname  -thin -detail -gb |grep tdev

2. Get the list of FA ports that these thin devices are mapped to
for i in `cat devs`; do symdev -sid XX show $i |grep FA; done
Validate the mapping info gathered from the above step
symcfg lis -dir XX -p X -address -avail

3. Write disable the devices
for i in `cat devs`; do symdev write_disable $i -celerra -sid XX -nop; done 
Check for no errors on command exit.

4. Unmap the thin devices from all the directors
for i in `cat devs`; do symconfigure -sid XX -cmd "unmap dev $i from dir all:all emulation=CELERRA_FBA;" commit -nop; done 
Check for no errors on command exit.

5. Validate that the unmapping is successfull.
for i in `cat devs`; do symdev show $i -sid XX |grep FA; done
Check for N/A listed for FA on the command exit


6. Unbind the thin devices from the thin pool
for i in `cat devs`; do symconfigure -sid 47 -cmd "unbind tdev $i from pool NAS-AR-R62;" commit -nop; done
Check for no errors on command exit.


7. Validate that the unbinding is successfull.
for i in `cat devs`; do symdev show $i -sid XX |grep Pool; done
Check for N/A listed for Pool on the command exit


8. Get the list of data devices in the NAS pool:
symcfg -sid xx show -pool poolname -thin -detail -gb |grep tdat



9. Disable the data devices from the NAS Pool

for i in `cat debs`; do symconfigure -sid xx -cmd "disable dev $i from pool pool name, type=thin;" commit -nop


10. Reve data devices from the NAS Pool

for i in `cat devs`; do symconfigure -sid XX -cmd "remove dev $i from pool poolname, type=thin;" commit -nop


11. Add the data devices to the Prod SATA Pool
for i in `cat devs`; do symconfigure -sid XX -cmd "add dev $i to pool poolname, type=thin, member_state=ENABLE;" commit -nop


12. Validate that the devices have been successfully added to the Pool 
symcfg -sid xx show -pool PROD-AR-R62 -thin -detail -gb


13. Initiate the Pool Rebalance
symconfigure -sid XX -cmd "start balancing on pool XXXX;" preview/commit -nop 


14. Validate that the Rebalance is successfull.
symcfg -sid xx show -pool PROD-AR-R62 -thin -detail -gb 
Check for "Balancing" for Pool state


14. Verify the growth in the Pool size
symcfg -sid xx show -pool PROD-AR-R62 -thin -detail –gb









No comments:

Post a Comment