- The following configuration was employed on XenServer 5.6, but should be relevant to XenServer 5.6 FP1 as well.
- The solution has not been rigorously tested and is not supported by Citrix.
- This article does not go into detail on how to use the Linux command line. Please refer to Linux documentation for further information if necessary.
Before increasing the LUN size, it’s a good idea to gather some information to determine how the system currently sees the LUN.
First, we’ll get the status of the multipath driver. Note that the last element of the colon separated numbers is the LUN number as identified by the storage array. When there are multiple LUNs, using the ID is a good way to narrow down the devices you care about.
The important information from this output that we’ll need later is the SCSI ID of the LUN, in this case, 36001f9300177800002cb000200000000.
Next, we’ll take a look at how the SCSI layer views the multiple devices that make up the separate paths to the LUN. Note that you’ll use the devices found in the previous output, in this case “bcde”. Also note that the “3>&1 2>&3” is just some CLI magic to eliminate stderr from the output that we pass to grep. You can omit it if you’d like.
Next we’ll find the UUID of the storage repository (SR) that we’re expanding:
Using the UUID of the SR (172b7166-5fb7-fc63-75d9-cd3275129751), now we’ll take a look at how the logical volume manager (LVM) is seeing the LUN:
Note that LVM is using a physical volume (PV) size of 99.99G from this output.
Now, increase the LUN size at the storage array. In the example here I’ve resized a 100GB LUN to 150GB.
Note that the process below APPEARS to work with VMs running on the SR. To be completely safe it’s recommended that you shutdown the VMs that are using the SR prior to executing the commands.
Increasing the size of the LUN on the array does not change how XenServer sees/uses the LUN automatically. Now we’ll need to have the HBAs scan the array to find the resized LUN. Note that this process is done differently for each HBA manufacturer. The command below is used with Emulex HBAs. If using QLogic HBAs I believe you can use /usr/bin/rescan-scsi-bus.sh to accomplish the same thing, but have not been able to validate.
After the rescan the SCSI subsystem now recognizes the change:
But the multipath subsystem doesn’t yet know about the change:
To get the multipath subsystem to recognize the change we have to tell it to resize the LUN. Using the SCSI ID found in the mpathutil output (36001f9300177800002cb000200000000), run the following command:
Now note that the multipath subsystem has become aware of the change and now reflects the 150GB LUN.
Now looking at the LVM subsystem, we find that it is still unaware of the change.
Using the device found in the previous pvs output (/dev/mapper/36001f9300177800002cb000200000000) we’ll now expand the PV to use the new LUN size:
And the change is reflected by reissuing the pvs command:
Finally, if you look at the General tab of the SR in XenCenter you’ll find that the XenServer management stack still hasn’t recognized the change. To make it aware we need to rescan the SR using the UUID we found earlier in the process:
Now you should have all subsystems and XenCenter reflecting the updated LUN size.