Support > Knowledge Base
Knowledge Base

|
Making Masked LUNs Settings Persistent Across Reboots on ESX Server
Details
On the ESX Server management interface, I go to the Options > Advanced Settings page and change the value of the property Disk.MaskLuns. The change takes effect immediately, but when I reboot my ESX Server host, those settings are not persistent. How can I make these settings persistent across reboots?
Solution
This happens when the value of Disk.MaskLUNs is not delimited by quotation marks ("). To properly mask LUNs on your ESX Server system:
- Identify the LUNs that you want to mask.
- Identify all paths to the LUNs that you want to mask.
- The LUN masking string (that is, the value of Disk.MaskLUNs) must include all paths to the LUNs that you want to mask.
- Write the LUN masking string to the proc nodes. For example (replace the vmhba target and LUN numbers with your own values):
echo "vmhba1:0:1,5,7-10;vmhba1:1:1,5,7-10" > /proc/vmware/config/Disk/MaskLUNs
This masks LUNs 1, 5 and 7 through 10 on targets 0 and 1 on vmhba1. If you have a second HBA (for example, vmhba2), you must add the corresponding paths to the same LUNs. So, assuming that the target numbers are similar on vmhba2, the value would be:
vmhba1:0:1,5,7-10;vmhba1:1:1,5,7-10;vmhba2:0:1,5,7-10;vmhba2:1:1,5,7-10;
- If you want these LUN masking settings to persist across reboots, modify the Disk.MaskLUNs advanced option using one of the following methods:
- On the management interface as root:
- Choose Options > Advanced Settings.
- Locate the option named Disk.MaskLUN.
- Enter the LUN masking string value as follows. Make sure only a single pair of quotation marks surrounds the LUN masking string value:
"vmhba1:0:1,5,7-10;vmhba1:1:1,5,7-10"
- Choose Options > Advanced Settings.
- On the service console as root:
- Using an editor of your choice (for example, vi or nano), open the file /etc/vmware/vmkconfig and locate the following line:
Disk/MaskLUNs = "..."
If this line does not exist, create the line and edit it so that it looks like this (notice the double set of quotation marks):
Disk/MaskLUNs = ""vmhba1:0:1,5,7-10;vmhba1:1:1,5,7-10""
- Save and close the file.
- Using an editor of your choice (for example, vi or nano), open the file /etc/vmware/vmkconfig and locate the following line:
- On the management interface as root:
- Be aware of the following important notes:
- There should be only one occurence of Disk/MaskLUNs = "..." in the /etc/vmware/vmkconfig file.
- The LUN masking string should include all paths to all LUNs that are selected for masking.
- When modifying the /etc/vmware/vmkconfig file, you must use the quotation marks ( " ) twice to delimit each side of the LUN masking string.
- Using LUN masking cancels the effect of the advanced optionDisk.MaxLUNs.
- There should be only one occurence of Disk/MaskLUNs = "..." in the /etc/vmware/vmkconfig file.
Keywords
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.
Actions
- KB Article: 2057
- Updated: Aug 14, 2009
- Products:
VMware ESX - Product Versions:
VMware ESX 2.0.x
VMware ESX 2.1.x
VMware ESX 2.5.x

