VMware
 

Knowledge Base

Search the Knowledge Base   View by Article ID
 

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:

  1. Identify the LUNs that you want to mask.

  2. Identify all paths to the LUNs that you want to mask.

  3. The LUN masking string (that is, the value of Disk.MaskLUNs) must include all paths to the LUNs that you want to mask.

  4. 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;

  5. 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:

      1. Choose Options > Advanced Settings.

      2. Locate the option named Disk.MaskLUN.

      3. 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"

    • On the service console as root:

      1. 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""

      2. Save and close the file.

  6. 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.

Keywords

2057

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.

Feedback

Rate this article:
(1 Ratings)

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
Email address (optional)
Submit
Rate this article:
(1 Ratings)
Actions