Extend/Alter a LUN in VMware
Extending a LUN (Logical Unit Number) in VMware involves several steps. You need to extend the LUN at the storage level first, and then you’ll need to rescan and adjust settings in VMware. Here’s a step-by-step guide:
Step 1: Extend the LUN at the Storage Level
Log in to Your Storage Array Management Interface: Use the management tool provided by your storage vendor (e.g., Dell EMC Unisphere, NetApp OnCommand, HPE StoreOnce, etc.).
Find the LUN: Locate the LUN that you want to extend.
Increase the LUN Size: Use the storage array’s management interface to increase the size of the LUN. The steps here will vary depending on the storage system you’re using. Usually, you’ll select the LUN and then find an option to resize or extend it.
Step 2: Rescan the Storage in VMware
Log in to VMware vSphere Client: Access the vSphere client interface.
Rescan Storage:
- For ESXi Hosts:
- Go to the “Storage” view.
- Select the “Adapters” tab.
- Click on the “Rescan” button or option to refresh the storage information.
- In some cases, you might need to select “Rescan All” or “Rescan” for both the “HBA” (Host Bus Adapter) and “VMFS” (VMware File System) to update the size.
- For vCenter Server:
- Go to the “Storage” view.
- Click on “Storage Adapters”.
- Select the appropriate adapter and click “Rescan”.
- You may also need to rescan the VMFS volumes if you are using VMFS datastores.
Step 3: Increase the File System Size in VMware
Update the File System:
- For VMFS Datastore:
- Go to the “Storage” view in the vSphere client.
- Find the datastore associated with the LUN.
- Right-click on the datastore and select “Increase Datastore Capacity” or a similar option.
- Follow the prompts to increase the size of the VMFS file system.
- For Individual Virtual Machines:
- If you have a virtual disk that needs to be extended, you will need to do that from within the virtual machine’s OS.
- Inside the guest OS, use the appropriate tools to extend the partition and file system. For Windows, use Disk Management; for Linux, use tools like
fdisk
,parted
, orresize2fs
.
Step 4: Verify the Changes
Check Storage Capacity:
- Go back to the “Storage” view and verify that the datastore or LUN now reflects the increased size.
- Ensure that your virtual machines and applications are able to use the additional space.
Test Access:
- Verify that the virtual machines and applications can access and use the extended space without issues.