This post is more than 5 years old
2 Intern
•
138 Posts
0
3557
July 1st, 2013 13:00
How do I remove a device from ALL Storage Groups?
All:
The "symaccess" man page says that I can remove a device from a specific storage group. But I want to remove a device from all and every storage group that it is in? Is there some way to do the equivalent of this:
symaccess -sid XXXX -name ALL -type stor -unmap remove devs YYYY ?
There is no such option in "symaccess" apparently...
Stuart
0 events found
No Events found!


dynamox
11 Legend
•
20.4K Posts
•
87.4K Points
0
July 1st, 2013 13:00
I don’t think so, you will need to specify individual storage group
cincystorage
2 Intern
•
467 Posts
1
July 1st, 2013 20:00
Doing this from memory... so TEST it yourself... but this should work...
for x in `symaccess -sid SID list -type storage -dev DEV -output xml |grep group_name |sed 's/<[^>]\+>//g'`
do
symaccess -sid SID -name $x -type storage remove devs DEV -unmap
done
something like that..
Archuperi721
110 Posts
0
July 2nd, 2013 04:00
All I can say, disable the device on all the FA's at one shot to stop the host r/w, and remove one by one... I'm not sure whether "Marks" script works... will try later...
when you have multiple MV with the combination of chosen volume and FA port(s), you can unmap a device from a FA port when you remove the device from last storage group,
StuartA58
2 Intern
•
138 Posts
0
July 2nd, 2013 07:00
Sunil_nc:
That's a good point. We have a bunch of 3-way Clusters and BCVs so that the same Device is masked (and mapped) to multiple different servers and FA Ports in different patterns - I won't be able to "-unmap" the device from the 1st 2 servers, because it will need to be mapped to mask to the 2nd and 3rd servers, etc. I'll see how that goes.....
Stuart
cincystorage
2 Intern
•
467 Posts
0
July 2nd, 2013 07:00
Yeah, I wasn't sure you'd be able to unmap them because I wasn't sure where you had them mapped to..
StuartA58
2 Intern
•
138 Posts
0
July 2nd, 2013 07:00
Archuperi:
I wound up doing something like that after "dynamox" answered. Thanks. I wasn't removing all of the devices from the Storage Groups, just some of them.
Furthermore it appears that you can't remove the "last" device (not the highest address, but the actual 1 remaining device). I saw it in another forum answer. I'm not doing that, so I'm good.
Stuart
Archuperi721
110 Posts
0
July 8th, 2013 06:00
I meant to say,
If 1 device is added to multiple MV, with combination of 1 PG & multiple SG, then you can unmap the device when you touch last group or MV.
Regards,
Periyakaruppan N (Peri),
SAN specialist