Unsolved
This post is more than 5 years old
14 Posts
1
1269
Orphaned Storage
Hi, I'd like to find orphaned storage across DMX and VMAX.
Not interested in reclaiming thin space, but to find devices that are either in a Storage Group that are not in Masking Views, or other situations where devices could appear to be in use from some perspectives, or DMX devices that are mapped / masked to host WWNs that are no longer there using login info etc, and similar situations.
There must be many people who have tackled this in many ways. I can see approaches to collect the info that I want, but if folk have good ways of collecting this, to save reinventing the wheel, techniques like that would be greatly appreciated?
Many thanks.
PedalHarder
465 Posts
0
September 1st, 2016 19:00
Symcli handles many of the checks you are after natively. Here are some examples to get you started...
Thin devices that are no not mapped to an FA:
symdev list -thin -noport
Thin devices that are not in a Storage Group:
symdev list -thin -notinsg
Tdevs no bound to a pool:
symdev list -tdev -unbound
Devices Mapped to a port but not in an MV (not valid for DMX):
symaccess list no_assignment
List WWN's that are in the login history table, but not currently logged in:
symaccess -sid 55 list logins | grep -v "Yes Yes"
To check WWN's that are in the login history table, but not in an IG, put a couple of commands together:
for wwn in $(symaccess -sid 00 list logins | grep ^[0-9] | cut -c 1-16); do
echo " checking wwn $wwn"
symaccess -sid 55 -type initiator list -wwn $wwn > /dev/null 2>&1
if [ $? -ne 0 ];then
echo "$wwn not in any IG"
fi
done
PedalHarder
465 Posts
0
September 4th, 2016 21:00
Minor efficiency update to the script (avoid processing the same WWN multiple times):
for wwn in $(symaccess -sid 00 list logins | grep ^[0-9] | cut -c 1-16 | sort | uniq); do
echo " checking wwn $wwn"
symaccess -sid 55 -type initiator list -wwn $wwn > /dev/null 2>&1
if [ $? -ne 0 ];then
echo "$wwn not in any IG"
fi
done