How to Configure LUN Masking in VMware ESXi Host
Welcome to http://www.diarysysadmin.com/
The goal from LUN Masking on VMware architecture is restricting the availability of logical storage to hosts in a cluster or more, many of the fundamental reasons of each administrator vmware cluster which is different from each other.
This article did't review the reasons and what are the advantages of this method, because I believe the rules are varieated from one organization to another organization which specifies the reason why it is necessary to carry out this method.
It is usually not a vmware administrator who did this, but the administrator of the data storage medium (storage engineer) did so. But of course the tool or the software used is not something that is free, usually the tool has become an integral part of the products offered by the service providers of data storage media system (storage).
My advise is doing this method in your LAB before hand.
- First step is prepare which LUNs would you used as a LUN masking, write down your LUN Identifiers code (this is very important, considering the LUN identifier is unique). You can check any LUN that have been identified and can be used on an ESXi host by login directly to the ESXi hosts using the vSphere Client or CLI.
- For a simple thing, I use the media CLI by running the command
esxcli storage device list | less
- When you run the above command, the output will show a list of the storage or LUN which can be used by your ESXi, consider again whether the LUN that will make LUN Masking is detected and appropriate for the LUN identifier, if indeed there we go to the next process by running the command
esxcli storage core device list -d "your LUN Identifiers"
- For a simple thing, I use the media CLI by running the command
- The output is detailed information of your LUN, at this step, you are ready to perform LUN Masking method. There are several ways of doing LUN Masking including:
- Mask by Path: used this method when you are just going to run on a single LUN only
- Mask by Transport Type: This method is done when you would run on one type of connection, as an example of the method will be performed on all types of connections iSCSI or FCoE storage
- Mask by Vendor: This method is executed when you will run the LUN masking on your storage vendor (for example, you would run the LUN masking on all NetApp storage systems or EMC)
Here I will introduce claimrule methods.So, what it claimrules, I just explain briefly (for details please look for another article) which allows us to make policy claimrules on ESXi system hosts so that we can carry out three mechanisms LUN Masking.
I believe, following the guidelines in this article will understanding what claimrules is and the function.
- Run the command
esxcli storage core claimrule list
The output of the above command is to show claimrule are currently running on your host ESXi system, we will run the first mechanism for this method of LUN Masking Mask by Path. Earlier you had recorded LUN identifier from one LUN that will make LUN Masking media experiment. - Continue to run the command
esxcfg-mpath -m | grep "your LUN Identifier"
Details of your LUN will be seen, then we will be running the LUN Masking method by first making claimrule, while the components of claimrule:- -r : ID from claimrule
- -t : type or types (you still remember there is a mechanism for the path location, vendors and transport for this type of connection)
- -A : HBA adapter
- -C : channel
- -T : target
- -L : LUN Number
- -P : plugin type
- the results of the last couple of command output above, you will form claimrule following command
esxcli storage core claimrule add -r "id claimrule baru anda disini" -t location -A "Your HBA ID" -C 0 -T 3 -L 0 -P MASK_PATH"
- after the process is complete, continue with the command
esxcli storage core claimrule load
The above command is to enable claimrule newly created earlier, do check the list claimrule and viola, claimrule that you just created already appear on the list - now time we run the LUN Masking method, run the command
esxcli storage core claiming reclaim -d "Your LUN Identifier"
- continue with the command
esxcfg-scsidevs -m | grep "Your LUN Identifier"
If the results of the command "no result" then you've managed to do LUN masking method, so you will not see the LUN.
At some reason you want that the LUN reappear in your ESXi host, Follow the steps below :
- simply delete claimrule that we previously created with the command
esxcli storage core claimrule remove -r "Your ID Claimrule"
- then.......
esxcli storage core claimrule load
- continue with.......
esxcli storage core claiming reclaim -t location -A "Your HBA ID" -C 0 -T 3 -L 0
- then........
esxcfg-rescan "Your HBA ID"
** Note : Pay attention to every detail steps that informed, failure or damage to your system or data is not my responsibility "Do With Your Own Risk" or you can do research through the Lab to minimize your system failure
Tama on Google+
Comments
Post a Comment