16 thoughts on “8 weeks of #VCAP – LUN Masking

    1. Thanks Jason – I always though they were reserved πŸ™‚ Now I know! Thanks for the links back as well and congrats

  1. If a ESXi 5 host is connected to Multiple storage arrays: EMC/Netapp/Dell etc. We want to mask all paths to particular storage array only. For example lets take we want to mask all paths from ESXi 5 host to EMC array only. What will be the command for the same. Also assume host has 2 FC adapters vmhba2 and vmhba3

    1. Hey – thanks for the comment. You can mask luns by vendor and/or model by changing the -t parameter to vendor – IE, To mask all paths to an array from vendor MyVendor and model MyModel I would use

      esxcli storage core claimrule add -u -t vendor -V MyVendor -M MyModel -P MASK_PATH

      To list out your vendors and models to get the correct string you can use

      esxcli storage core device list

      Hope this helps πŸ™‚


      1. Thanks for the reply. Here this u parameter is for what.
        Also do we need to add any core claiming unclaim/reclaim command also.

        1. -u just assigns and automatic rule id, so we don’t have to do that…

          and yes, you will need to unclaim those devices

          esxcli storage core claiming unclaim -t vendor -v MyVendor

          and then rescan your storage adapters – also, not this time the lowercase v is used πŸ™‚ Nice eh?

          1. Thanks Preston. Your site is really helping me to prepare for VCAP5 DCA. I have already purchased your Troubleshooting Book. Keep it up with the good work.

          2. Hi Preston,
            I successfully removed the storage array from the host using above commands.

            How do i bring the storage array back.
            I removed the core claimrule which i added.But storage array is not visible.

  2. Interesting. I never knew what they meant by LUN masking at the HOST as I always use the back-end SAN utilities to simply remove the host from the storage group to avoid incorrectly writing to datastores. I often use this when building hosts and rarely need to mask single LUNS from specific HOSTs although I’m sure there are reasons. I still prefer working at the SAN level and not involving ESX hosts themselves as this seems inefficient even if they do have it on the exam…great info though.

    1. I’m the same way, always use the tools provided by the array vendors to unpresent LUNs from hosts.

      That said, it’s listed on the blueprint so I covered it! As for a use case, I’m still trying to find one πŸ™‚

      Thanks for the comment

      1. Always good to know alternatives should the need arise. I just couldn’t think of any reason to mask individual LUNs from specific hosts so I thought I would comment…thanks for the information most appreciated.

Leave a Reply

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