Expanding a Multipath iSCSI LUN in a XenServer 6 Pool without Downtime

You’ve increased the size of a LUN used by your XenServer pool and you’re realizing that the size hasn’t updated in XenCenter, even after rescanning your storage repository. A few more (manual) steps are required to get up and running. The good news is that you won’t need to reboot any of your VMs or complete a rolling migration procedure.

A Brief Intro

There are four layers of storage abstraction that we will be dealing with. They exist in this order:

  1. SCSI 
  2. Multipath
  3. LVM
  4. XenServer

The LUN resize you previously completed could be considered layer 0. This document will proceed to describe the steps that need to be taken at each layer to eventually bubble the changes up to XenServer.


The procedures outlined in this article were tested against the following configuration:

  • 3 server XenServer pool
  • Multipath iSCSI-attached LUN
  • XenServer 6

If you are using a different setup, you may need to make changes at any storage layers that are affected.


Complete each of these steps on the pool master.

SCSI Layer

Run this command to determine which devices make up the connection to your iSCSI LUN. You should see a device for each iSCSI path:

mpathutil status

If you have more than one LUN that you’re connected to, you can likely differentiate the LUNs by looking at the [size=*G] readout for each.

Once you’ve determined the devices that are involved, run the following command, substituting the devices for your own. Note: you can use brackets to select multiple devices at once.

fdisk -l /dev/sd[bcde] 3>&1 2>&3 | grep GB

You’ll see that each of the capacities still show the size of the LUN before the increase. Run this command to update them:


If you run the fdisk command again, you’ll see that the new size is now shown. First layer complete!

Multipath Layer

Run the following command again:

mpathutil status

You are looking for the SCSI ID of the LUN we’re working on. It will look something like this: “36001f9300177800002cb000200000000”. Take that value and run the following command to update the Multipath layer:

multipathd -k"resize map [scsi_id]"

You can run “mpathutil status” again to see that the “[size=*G]” has updated.

LVM Layer

First, run this command to get the uuid of the associated LVM physical volume.

xe sr-list

Sub the uuid you retrieve from that command in for this command:

pvs | grep [uuid]

The response of this command will show a device name, likely on the last line of the response. Ours was “/dev/dm-2”. Use this device name in this command:

pvresize [device-name]

Finally, run the “pvs | grep [uuid]” command again to verify that the size has increased.

Update XenServer

Next, we need to notify XenServer. Run this command first to get the uuid of the storage repository, unless you still have it handy:

xe sr-list

Then, run this command, subbing in the uuid of the storage repository:

xe sr-scan uuid=[uuid]

Wrapping It Up

You’ve completed all of the necessary steps for the pool master. Now, repeat these steps on each slave server in the pool. As a final step, you will need to disconnect and reconnect to the pool in XenServer for the interface to reflect the change in size.