Unable to claim the LUN back after unmasking it
search cancel

Unable to claim the LUN back after unmasking it

book

Article ID: 311339

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Running a rescan after unmasking the masked path fails
  • In the VMkernel log files, you see an entry similar to:

    Path vmhba34:C0:T1:L0 is claimed by plugin MASK_PATH, but current claimrule number 65535 indicates that it should be claimed by plugin NMP

    Note: This log entry indicates that path (L0) is still claimed by MASK_PATH although there are no more MASK_PATHs for that LUN.


Environment

VMware vSphere ESXi 5.0
VMware ESX 4.0.x
VMware ESXi 4.1.x Embedded
VMware ESXi 4.0.x Embedded
VMware ESX 4.1.x
VMware ESXi 4.0.x Installable
VMware ESXi 4.1.x Installable

Resolution

To resolve this issue, you must remove the MASK_PATH claim rule, reload the path claiming rules from the configuration file and then unclaim each path to the masked device.

To unmask the paths:

  1. List the current claim rules that are configured on the host:

    ESXi 5.x: # esxcli storage core claimrule list
    ESXi/ESX 4.x: # esxcli corestorage claimrule list

  2. Run this command to remove the MASK_PATH claim rule:

    ESXi 5.x: # esxcli storage core claimrule remove --rule claim_rule_number
    ESXi/ESX 4.x: # esxcli corestorage claimrule delete --rule claim_rule_number

    Where claim_rule_number is the MASK_PATH rule number that you created.

  3. Run this command to reload the path claiming rules from the configuration file into the VMkernel:

    ESXi 5.x: # esxcli storage core claimrule load
    ESXi/ESX 4.x: # esxcli corestorage claimrule load

  4. Run this command to verify that the claim rule was deleted correctly:

    ESXi 5.x: # esxcli storage core claimrule list
    ESXi/ESX 4.x: # esxcli corestorage claimrule list

  5. Run this command to unclaim each path to the masked device:

    ESXi 5.x: # esxcli storage core claiming unclaim -t location -A vmhba0 -C 0 -T 0 -L 2
    ESXi/ESX 4.x: # esxcli corestorage claiming unclaim -t location -A vmhba0 -C 0 -T 0 -L 2

    This ensures that all paths to the device are unclaimed successfully before running the claim.

    Note: With ESXi/ESX 4.x, the esxcli corestorage claiming unclaim --type location vmhba1 command to unclaim paths might result in issues if the unclaim for one of the paths times out. VMware recommends that you use the esxcli corestorage claiming unclaim --type plugin --plugin MASK_PATH to unclaim paths.

  6. Perform a rescan for the changes to take effect. Previously masked LUNs are now accessible by the ESXi/ESX host.

    To rescan ESXi/ESX 4.x hosts, run the command:

    esxcfg-rescan -A

    This command rescans all HBAs.

    For ESXi 5.x:

    esxcli storage core claimrule run