VMware Edu & Cert Community
lukeglazebrook
Enthusiast
Enthusiast

Where did I go wrong with my Chapter 10 scenario question regarding LUN masking? Was I wrong or did I do it a different method?

So I started some practice questions today from the official guide.  One of which being...

Overview: A new fiber-based logical storage device (LUN) has been presented to your host cluster and is managed by the VMware Native Multipathing Plug-in. The logs on one ESXi host indicate intermittent issues with the new LUN. No datastores or virtual machines (VMs) are currently using the LUN.

Objectives: Temporarily change the masking on the host such that it cannot access the LUN.

Specific Requirements: You need to use the ESXi shell or vCLI to execute commands to mask a LUN whose ID is naa.600601604550250018ea2d38073cdf11 from an ESXi host.

My answer was as follows in essence in my single host lab with no FC...

esxcli storage core claimrule add -r946 -t transport -R fc -P MASK_PATH --device=naa.600601604550250018ea2d38073cdf11 (I figured this would mask the specific device, and the command took ok)

esxcli storage claim rule list (to confirm its there)

esxcli storage claimrule load (to load it)

But apparently my answer should have been as shown below.  Can someone please explain what my answer would have achieved if anything?  I have gone through so much study material that I feel like I have forgotten claim rules and clearly will need a revisit.  I can't really do this properly in the lab I feel since I only have ISCSI.

1. Execute these commands to list all the paths for the LUN:

esxcfg-mpath -b -d naa.600601604550250018ea2d38073cdf11

2. Examine the results. For this example, assume the paths are vmhba33:0:0:0, vmhba33:0:1:0, vmhba33:0:2:0, and vmhba33:0:3:0.

3. Execute this command to display the current claim rules:

esxcli storage core claimrule list

4. Examine the results. For this example, assume the rule numbers 192–195 are unused and the rule that currently claims the LUN has a number greater than 195.

5. Execute these commands to add claim rules (to assign each of the LUN’s paths to the MASK_PATH plug-in):

esxcli storage core claimrule add --rule 192 -t location -A vmhba33 -C 0 -T 0 -L 0 -P MASK_PATH
esxcli storage core claimrule add --rule 193 -t location -A vmhba33 -C 0 -T 1 -L 0 -P MASK_PATH
esxcli storage core claimrule add --rule 194 -t location -A vmhba33 -C 0 -T 2 -L 0 -P MASK_PATH
esxcli storage core claimrule add --rule 195 -t location -A vmhba33 -C 0 -T 3 -L 0 -P MASK_PATH

6. Execute this command to load the new rule set:

esxcli storage core claimrule load

7. Execute these commands to unclaim all the LUN’s paths from the currently assigned plug-in and reclaim the paths on the newly assigned plug-in.

esxcli storage core claiming reclaim -d naa.600601604550250018ea2d38073cdf11
esxcli storage core claiming unclaim -d naa.600601604550250018ea2d38073cdf11 -t location
esxcli storage core claimrule run

8. Rescan the HBAs and verify the LUN is no longer present.

0 Kudos
3 Replies
JPM300
Commander
Commander

I would have to dig into my notes, but I would highly recommend watching this section in Jason Nash's Plurasight(AKA train-single) course, he even catches a bug or a type-o in the current documentation, I just forget if it was this chapter or another.

Does the LUN acutally Mask? AKA your Datastore is no longer visible when doing a re-scan.

0 Kudos
lukeglazebrook
Enthusiast
Enthusiast

Hello mate,

With regards to...

"Does the LUN acutally Mask? AKA your Datastore is no longer visible when doing a re-scan"

I put in a fictitious ID, I put in the ID from the books example in fact and I don't have FC in my lab so I presumably I have no way of confirming.  Whats your gut feeling incidentally, I was hoping my method would work since it seems far easier to me to remember I doubt it will however Smiley Sad

Thanks for your advice I will revisit the video training, my concern is that I wont remember the command to list all paths during the actual exam there simply feels like there is too much to remember.

0 Kudos
jitla1971
Enthusiast
Enthusiast

i use iscsi storage in my home lab and i have always used the method stated in the book

esxcli storage core claimrule add -r xxx -t location -A vmhba34 -C 0 -T 0 -L 1 -P MASK_PATH

its always worked, never tried the command you stated.

are you going through all the chapter 10 scenario questions, to help prep for the exam??

Im using the same method, got my exam on June 3rd.

So i am going through the questions and seeing how quickly i can complete the task specified.

0 Kudos