VCAP5-DCA Objective 1.1 Understand and apply LUN masking using PSA-related commands iSCSI/MPIO

Share This:

On the road to VCAP5-DCA (Aug 2015) , I thought I will blog stuff as I go along. Here’s Objective 1.1 Understand and apply LUN masking using PSA-related commands. LUN masking gives you control over which hosts see which LUNs. Typically this is done on the SAN-end but in cases you would want to make LUNs available to all the hosts and perform the masking on ESXi end.

My lab (storage) is configured using active:active iSCSi virtual adapters (MPIO), meaning two vNICs on each hosts are binded to vmkernel ports exclusively for storage traffic.












Step1. – Identify LUN to be masked 

In order to mask the LUN, ssh into the hosts on which the LUN will be masked and list LUNs (which contain VMFS datastores)

In my case I have created new datastore Ndatastore for this exercise, therefore the device id I’m after is: naa.60003ff44dc75adcaf965c0ff08dc0d1

Step2. Check the path(s) to this LUN

As we have iSCSi MPIO I expect to see 2 paths.

Highlighted paths are in bold.

Step3. Check if the claim rules are already defined if not define it.

As we can see no rules appear to have vmhba33:C1:T0:L3 or C0:T0:L3

Let’s define the rules:

(In this case I recommend adding one path at the time, I had issues adding rules for both paths, seeing error:(Unable to unclaim path vmhba33:C1:T0:L3 on device naa.60003ff44dc75adcaf965c0ff08dc0d1. Some paths may be left in an unclaimed state. You will need to claim them manually using the appropriate commands or wait for periodic path claiming to reclaim them automatically.) Adding the rule for each path at the time fixes the issue.

Step4. Load the rule and unclaim all the paths, try to reclaim all 

Load the rules:

Unclaim and reclaim the paths based on the rules:

(This error is obvious and correct – No panic 😀 as there are 2 paths and one is still not included in the rules)

Check the paths to LUN:

Great result, we can no longer see path: vmhba33:C0:T0:L3

Step5. Repeat step 3 and 4 for the second path:

(No output means good!)

Step5. Verify rules list, verify LUN paths, check for the datastore in vSphere client

Check the paths to LUN:

NDSNo sign of Ndatastore

Lun masking successfully completed.

To remove it please follow:


Hope that helps!



Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.