System information

Example B-5. Masking a LUN
In this example, you mask the LUN 20 on targets T1 and T2 accessed through storage adapters vmhba2 and
vmhba3.
1
#esxcli corestorage claimrule list
2
#esxcli corestorage claimrule add -P MASK_PATH -r 109 -t location -A vmhba2 -C 0 -T 1 -L 20
#esxcli corestorage claimrule add -P MASK_PATH -r 110 -t location -A vmhba3 -C 0 -T 1 -L 20
#esxcli corestorage claimrule add -P MASK_PATH -r 111 -t location -A vmhba2 -C 0 -T 2 -L 20
#esxcli corestorage claimrule add -P MASK_PATH -r 112 -t location -A vmhba3 -C 0 -T 2 -L 20
3
#esxcli corestorage claimrule load
4
#esxcli corestorage claimrule list
5
#esxcli corestorage claiming unclaim -t location -A vmhba2
#esxcli corestorage claiming unclaim -t location -A vmhba3
6
# esxcli corestorage claimrule run
Unmask Paths
When you need the host to access the masked storage device, unmask the paths to the device.
Procedure
1 Unmask a path to the storage device by running the esxcli corestorage claiming unclaim command.
Run this command for each path to the storage device.
For example:
esxcli corestorage claiming unclaim -t location -A vmhba0 -C 0 -T 0 -L 149
2 Load path claiming rules into the VMkernel by running the esxcli corestorage claimrule load
command.
3 Run the path claiming rules by entering the esxcli corestorage claimrule run.
Your host can now access the previously masked storage device.
Define NMP SATP Rules
The NMP SATP claim rules specify which SATP should manage a particular storage device. Usually you do
not need to modify the NMP SATP rules. If you need to do so, use vSphere CLI to add a rule to the list of claim
rules for the specified SATP.
You might need to create a new SATP rule when you install a third-party SATP for a specific storage array.
Fibre Channel SAN Configuration Guide
84 VMware, Inc.