How to Add LUN to VMware ESX
Shared storage is the backbone of a virtualized infrastructure, and storage area networks (SANs) are used to provide this shared storage for most VMware environments. In order to use a SAN, however, it is necessary to configure each VMware ESX host to connect to the SAN by using logical unit number (LUN) addresses. The steps to do so are different when connecting to an iSCSI SAN volume and a Fibre Channel SAN volume.
Things You'll Need
- VSphere service console
- ESX host
- Storage area network (SAN) target address
Instructions
-
Connect to an iSCSI SAN
-
1
Create a VMkernel port for physical network adapters. Use the service console to do this. Select an ESX host. In the pane to the right choose the tab "Configuration," and then select "Networking." Click on "Add Networking ..." from the menu to the right. Select "VMkernel." Leave the "Create a virtual switch" radio button selected and click "Next." Enter an appropriate name for "Network Label." Enter the VLAN ID information if appropriate and click "Next." Enter the IP settings for this device, and then click on "Finish."
An iSCSI software initiator cannot be used until a VMkernel port is configured for it.
-
2
Enable the software iSCSI initiator. Select an ESX host. Choose the tab "Configuration," and then select "Storage Adaptors." Select the iSCSI initiator. Click on "Properties," and then click "Enabled."
-
-
3
Configure "Dynamic Discovery" or "Static Discovery" for the SAN. Select an ESX host. Choose the tab "Configuration," and then select "Storage Adaptors." Select the iSCSI Initiator, and then "Properties." Click on either the "Dynamic Discovery" tab or the "Static Discovery" tab. Click on the "Add..." button in order to enter the IP address of the SAN or the SAN and target information (for Static Discovery).
When "Dynamic Discovery" is enabled, each time the initiator contacts the SAN it sends a special request called "Send Targets" in order to list, dynamically, which volumes are available. If "Static Discovery" is enabled, the LUN information for each target must be entered as well.
-
4
Scan for available LUNs. Select an ESX host, and then choose the tab "Configuration." Select "Storage Adaptors." Click "Rescan," which is displayed in the upper right region of the configuration panel.
With the iSCSI initiator configured and a SAN target specified, it is possible to scan for targets. This is also referred to as scanning for LUNs because the target information is displayed using the logical unit number.
Connect to a Fibre Channel SAN
-
5
Confirm that the ESX host is ready to use its host bus adapter (HBA). Select an ESX host, and then choose the tab "Configuration." Select "Storage Adaptors." Select the HBA device. Confirm that the "Type" field displays "Fibre Channel."
Fibre Channel SAN connections are typically configured using HBA devices. Before an HBA can be configured to connect to a SAN volume, it must be configured for use. If this is not the case, it is necessary to reinstall the HBA hardware device.
-
6
Scan for available LUNs using the service console. Select an ESX host, and then choose the tab "Configuration." Select "Storage Adaptors." Then select the Fibre Channel HBA. Click "Rescan," which is displayed in the upper right region of the configuration panel.
-
7
Configure the multipathing policy. Select an ESX host, and then choose the tab "Configuration." Select "Storage Adaptors." Select an HBA device in the "Storage Adapters" pane. Click on the "Devices" button in the "View:" pane. Right-click on a LUN, and choose "Manage Paths." Choose from the possible multipathing policies by using the drop-down menu labeled "Path Selection."
It is desirable to configure multiple network paths between the ESX hosts and the SAN storage devices for most enterprise VMware environments. The choices for multipathing depend on several factors, including the network environment, uptime requirements and the capacities of the SAN and HBA devices.
-
1
Tips & Warnings
It is important to review thoroughly the documentation for the iSCSI software initiator or the HBA in order to ensure that everything is configured properly.
While many administrators skip over configuring CHAP authentication and multipathing in order to get the VMware environment up and running quickly, these features can prevent many problems related to network outages and administrator error.
Before deploying a production VMware environment, it wise to assess carefully the capacity of the network on which the SAN and VMware hosts are deployed. At the very least, ensure that jumbo frames are enabled on both the SAN switches and the ESX hosts.
If the ESX hosts will be configured to boot from the SAN, it is necessary to configure LUN masking to prevent the boot volume from being visible. Failure to do so could permit the host to overwrite its own boot volume, thus disabling the host.
References
Resources
- Photo Credit keyboard image by Rade Cojbasic from Fotolia.com