April 24, 2014

EMC VMAX : Storage Reclamation using CLI


Consider following example :-

Symmetrix ID  = 1234
Host Name = CORALHOST
Masking View Name = CORALHOST
Inititaor Group Name = CORALHOST_IG
Port Group Name = CORALHOST_PG (Which contains ports 7g:0, 10g:0)
Storage Group Name = CORALHOST_SG
Initiator WWN = 1000000000000111, 1000000000000112
Thin Pool = THIN_SATA
Devices : AAAA:AAAB
FAST Policy Name : FAST_VP
FAST Policy Storage Group : FAST_REGULAR_SG

1). Backup all the Storage Group and Masking View configuraion currently on Symmetrix Array 1234

symaccess -sid 1234 –f MyBackup1234.bak backup

2). Verify Masking View details (Note it down for your future reference)

symaccess -sid 1234 show view CORALHOST

3). Delete Masking View

symaccess -sid 1234 view -name CORALHOST delete
Or
symaccess –sid 1234 view -name CORALHOST delete -unmap (Devices will be unmapped from the Ports)(Recommended)
4). Verify Initiator Group details

symaccess -sid 1234 show CORALHOST_IG -type init
5). Remove Initiators from Initiator Group

symaccess -sid 1234 -name CORALHOST_IG -type initiator -wwn 1000000000000111 remove 
symaccess -sid 1234 -name CORALHOST_IG -type initiator -wwn 1000000000000112 remove 

6). Delete Initiator Group

symaccess -sid 1234 -type initiator -name CORALHOST_IG delete

NOTE: If you have Parent and Child Initiator Groups. Please go through following steps.

Removing Child IG from a Parent IG:-

symaccess -sid 1234 -type initiator -name PARENT_IG remove -ig CHILD_IG

7). Check the login status of each WWN

symaccess -sid 1234 -wwn 1000000000000111 list logins  (Make sure it is not Logged In)
symaccess -sid 1234 -wwn 1000000000000112 list logins  (Make sure it is not Logged In)

NOTE : If it is showing as Logged In, dont remove the login details as mentioned in the Step 8. You can check whether the WWN is a member of any other Initiator Group with the below commands.

symaccess -sid 1234 list -type initiator -wwn 1000000000000111
symaccess -sid 1234 list -type initiator -wwn 1000000000000112

8). Remove the login details

symaccess -sid 1234 -wwn 1000000000000111 -login remove
symaccess -sid 1234 -wwn 1000000000000112 -login remove

9). Verify Port Group details

symaccess -sid 1234 show CORALHOST_PG -type port 

(Make sure this Port Group is not a part of any other Masking View)

10). Remove Ports from Port Group

symaccess -sid 1234 -name CORALHOST_PG -type port -dirport 7g:0,10g:0 remove 

11). Delete Port Group

symaccess -sid 1234 -type port -name CORALHOST_PG delete

12). Verify Storage Group details

symaccess -sid 1234 show CORALHOST_SG -type storage 

NOTE: In some environments Storage Group itself is associated with FAST Policy, in that case, proceed with Step 13 else Step 14.

13). Disassociate Storage Group from FAST Policy (if the FAST Policy is associted to Storage Group)

symsg -sid 1234 show CORALHOST_SG (This will show you the FAST Policy associated with this Storage Group)

symfast -sid 1234 -fp_name FAST_VP disassociate -sg CORALHOST_SG

14). Make the deives to 'Not_Ready' state

symdev -sid 1234 not_ready AAAA 
symdev -sid 1234 not_ready AAAB

15). Remove devices from Storage Group

symaccess -sid 1234 -name CORALHOST_SG -type storage remove devs AAAA:AAAB
Or
symaccess -sid 1234 -name CORALHOST_SG -type storage remove devs AAAA:AAAB -unmap (Devices will be unmapped from the Ports)(Recommended)

Check the device is mapped to any other ports via below commands

symdev -sid 1234 show AAAA | find "FA"
symdev -sid 1234 show AAAB | find "FA"

If it is mapped to some other ports, need to unmap from that also via following command. Then only we can able to delete the device.

symconfigure -sid 1234 -cmd "unmap dev AAAA from dir ALL:ALL;unmap dev AAAB from dir ALL:ALL; " preview
symconfigure -sid 1234 -cmd "unmap dev AAAA from dir ALL:ALL;unmap dev AAAB from dir ALL:ALL; " prepare
symconfigure -sid 1234 -cmd "unmap dev AAAA from dir ALL:ALL;unmap dev AAAB from dir ALL:ALL; " commit

16). Delete Storage Group

symaccess -sid 1234 -name CORALHOST_SG -type storage delete 
Check the above devices is a part of any other Storage Group (In some environments, devices are individually added to FAST Policy Storage Group, if that is the case you need to remove the devices from FAST Policy Storage Group also.)

symaccess -sid 1234 -type storage list -dev AAAA
symaccess -sid 1234 -type storage list -dev AAAB (This will shows the particular device is part of any other Storage Group)

If the device is part of Fast Policy Storage Group, remove the device from that Storage Group.

symaccess -sid 1234 -name FAST_REGULAR_SG -type storage remove devs AAAA:AAAB

NOTE: If these devices are in another Storage Group, it is your requirement to remove those from that Storage Group also.

17). Check in which pool the device is bound 

symdev –sid 1234 show AAAA | find "Bound”
symdev –sid 1234 show AAAB | find "Bound”

18). Unbind Thin Devices from Pool

symconfigure -sid 1234 -cmd "unbind tdev AAAA from pool THIN_SATA; unbind tdev AAAB from pool THIN_SATA;" preview
symconfigure -sid 1234 -cmd "unbind tdev AAAA from pool THIN_SATA; unbind tdev AAAB from pool THIN_SATA;" prepare
symconfigure -sid 1234 -cmd "unbind tdev AAAA from pool THIN_SATA; unbind tdev AAAB from pool THIN_SATA;" commit

Check the device is unbound properly via following command

symdev –sid 1234 show AAAA | find "Bound”
symdev –sid 1234 show AAAB | find "Bound”
If it is still showing as bound, then execute following command and wait the unbounding to complete.

symcfg -sid 1234 verify -tdev -unbinding -dev AAAA  -i 10
symcfg -sid 1234 verify -tdev -unbinding -dev AAAA  -i 10
19). Remove devices

symconfigure -sid 1234 -cmd "delete dev AAAA;delete dev AAAB;" preview
symconfigure -sid 1234 -cmd "delete dev AAAA;delete dev AAAB;" prepare
symconfigure -sid 1234 -cmd "delete dev AAAA;delete dev AAAB;" commit

20). Dissolve meta (If the device is meta, dissolve the meta also)

symconfigure -sid 1234 -cmd "dissolve meta dev AAAA:AAAB;" preview
symconfigure -sid 1234 -cmd "dissolve meta dev AAAA:AAAB;" prepare
symconfigure -sid 1234 -cmd "dissolve meta dev AAAA:AAAB;" commit

No comments :