EMC Command line find and remedy trespassed luns (this is being run on a EMC VNX 7500)
To list all of the luns that are trespassed on your array run (example output below)
NaviSECCli.exe -h emcvnx7500spa.example.com -user sysadmin -password sysadmin -scope 0 getlun -trespass
LOGICAL UNIT NUMBER 1118
Default Owner: SP B
Current owner: SP A
Ok so now you want to fix the trespass how do you do that?
NaviSECCli.exe -h emcvnx7500spa.example.com -user sysadmin -password sysadmin -scope 0 trespass mine
NaviSECCli.exe -h emcvnx7500spb.example.com -user sysadmin -password sysadmin -scope 0 trespass mine
So what is that last command doing and why am I running it twice?
The trespass command “Trespasses one or more LUNs to the control of an SP” and the “mine” option “Performs whatever trespassing is necessary to take all of the LUNs that have this SP as
a default owner.” Since you might have luns failed over from both SP’s you run it on each sp to have that SP grab control back of its own lun.
Additional note you can run this command from your Celerra or VNX File /nas/sbin/navicli -h emcvnx7500spb.example.com getlun -trespass