EMC – Using naviseccli to locate unused LUNs

I know I carry on like a bit of a pork chop when it comes to naviseccli – but I think some of the adulation is worth it. We’ve been trying to “reclaim storage” for a little while now (that’s code for not being allowed to spend money on additional capacity), and I’ve been looking for unused LUNs that may have been decommissioned and not unbound. To do this with naviseccli, use the getunusedluns command.

C:\Users\dan>naviseccli -h SP_IPaddress getunusedluns
RAID GROUP: 43
DC2_SAN_R5_ABCD_0923
RAID GROUP: 0
LUN 0 - VAULT - DO NOT USE

The output is fairly straightforward – you’ll get the RAID Group, followed by a list of LUN IDs that aren’t in use either by storage groups or replication features of the array (so you don’t accidentally destroy secondary images of mirrored LUNs, etc). If you’re happy with the list, you can go ahead and unbind those LUNs.

One interesting side-effect of using this command is that you’ll get a 71058233 error (‘Failing Command: Set LUN’) in the SP’s event logs. There’s a kb article on Powerlink (emc170736) for those of you who have access. If you don’t, here’s the root cause – “The getunusedluns command tries to determine if a LUN is unbound by issuing commands to the LUN to unload features (such as mirroring). If they cannot be unbound (by being unloaded), the LUN is not considered unused and these error messages show up in the log file.” So apparently it’s polite if you let the Ops team know before you run this command.