Masking paths to a LUN
You can remove access to a LUN by masking all of its paths to the ESXi host. This is done at the ESXi host, by using the MASK_PATH PSA plugin to claim the paths to the intended LUN.
In this recipe we will learn how to create a claim rule to mask paths to a chosen LUN.
How to do it…
The following procedure will help you mask paths to a LUN:
Get the NAA ID of the LUN that needs to be masked by issuing the following command. The command will list all the NAA IDs seen by the ESXi:
esxcfg-scsidevs -u
Get the multipathing information of the LUN by issuing the following command:
Syntax:
esxscfg-mpath –l –d <naa-id of the LUN>
Command to be executed:
esxcfg-mapth –l –d naa.6000eb30adde4c1b0000000000000112
Create a claim rule for each of the paths to the LUN by issuing the following command:
Syntax:
esxcli storage core claimrule add –r <rule number> -t location –A <hba> -C <channel number> -L <LUN Number> -P MASK_PATH
Command to be executed:
esxcli storage...