VMware Cloud Community
TheWizardUk
Contributor
Contributor

ESXI 6.5 and Fiber SAN

So I have a 16 Bay SAN and have set up 8 disks in a RAID 5 config and created a LUN,

the SFP / fibre and links to a HBA 4GB Fibre Channel card in a server where ESXI 6.5 is installed and configured

note the SAN is not a data store for ESXI,

This LUN is then passed to a windows 2012 server VM as a second HDD where the share has been created and permissions set etc. etc..

All is well so far.

So my issue comes around when I want to expand the SAN storage, so as an example I add a 9th disk to the SAN and add it into the RAID 5. From the SAN’s perspective, it now has a new x amount of space available with 0 downtime.

I remove the old LUN in the SAN config and create a new one,

ESXI now report an error with the old LUN as it no longer exists, refreshing and rescanning it does not pick up on the newly mapped LUN.

Rebooting the SAN and Windows 2012 VM still no joy

This only way I found for this new LUN to be picked up was to restart ESXI

After rebooting ESXI I could pass the LUN to the Windows VM and the new space was available

I am new to this so I am happy for someone to tell me I am doing this all wrong, but taking down ESXI seems daft to me?

Any help?

5 Replies
vijayrana968
Virtuoso
Virtuoso

Before rebooting, you could do a manual rescan and check the output

To rescan all HBAs:

esxcli storage core adapter rescan --all

To rescan a specific HBA:

esxcli storage core adapter rescan --adapter (vmkernel SCSI adapter name)

0 Kudos
TheWizardUk
Contributor
Contributor

Thanks for the reply,

is that command above different to the one called when pressing the rescan button from within the UI?

0 Kudos
jameseydoyle
VMware Employee
VMware Employee

Hi,

Those commands do nothing different to what is performed through the UI. The first question I would ask is about which method you are using to present the LUN to the Windows Machine. Are you presenting it as an RDM or are you using NPIV to present the device directly to the VM.

How NPIV-Based LUN Access Works

In either case, the host's HBA still has visibility to the device and is, ultimately, the only physical device discovering the LUN. With RDMs, the LUN is mounted to the ESXi host and presented to the VM via a mapping file. With NPIV, each VM is assigned a WWNN/WWPN that is created on the HBA uniquely for use by that VM, so you control the mapping of the LUN to a specific VM. Access is provided by the host's HBA, however. So, if you plan any changes to the device, you should first unmount and detach it from the ESXi host, as well as the VM.

When the changes have been made, you can present it using the VMs WWN and the host will discover the 'new' device.

If the device is simply used as an RDM, the device should be removed from the VM. This will only delete the mapping file, but not the contents of the LUN. The LUN will still be mapped to the ESXi host, so you should go through the process of unmounting and detaching it too in this instance. Once the 'new' device has been presented, you can recreate the RDM.

Detach Storage Devices

0 Kudos
TheWizardUk
Contributor
Contributor

Hi,

it is passed to the Windows 2012 VM via RDM, during the process i did remove the RDM disk from the VM, however i could not find detect option in ESXI 6.5 under storage and devices.

so to summarise this process if you could confirm?

i want to expand the SAN storage,

from the SAN i add the disk into RAID

I remove the RDM from the VM.

i detach the storage device from ESXI -- not sure how this is done in 6.5?

from the SAN i remove the old LUN and create a new map

Rescan under ESXI, Storage and Devices.

0 Kudos
jameseydoyle
VMware Employee
VMware Employee

The procedure is exactly the same for vSphere 6.5:

Performing Planned Storage Device Removal

The procedure to follow depends on whether the device will be presented back to the ESXi host with the same NAA ID or not. If the NAA ID changes as a result of the modifications at the array level, it will be detected by ESXi as a brand new device and so cannot be re-attached. Otherwise the steps would be:

1. Note the NAA ID of the relevant device to be expanded

2. Remove the RDM from the VM

3. Detach the storage device from all hosts with visibility to the LUN, using the NAA ID to identify it (Detach Storage Devices )

4. Unmap the LUN from the hosts

5. Add the disk to the RAID group

6. Reconfigure the LUN

7. Map the LUN to all relevant ESXi hosts

8. Rescan the storage to discover the new device. If the device was presented back with the same NAA ID, you will need to re-attach the device (Attach Storage Devices​)

9. Recreate the RDM on the VM