Tuesday, June 23, 2009

Expanding a XenServer iSCSI Storage Repository

We use XenServer with a Dell MD3000i as our iSCSI Storage Repository. In my previous post, I went over how to increase the size of a Virtual Disk on the MD3000i. Now I'll go over how to make XenServer see the larger size virtual disk.

There are two methods to go about doing this - one is command line driven, the other is done though Xen Center. I'm not much on command lines, so I'll start with the latter.

Make sure you read all instructions before starting.

Expand Using Xen Center 5.x
  1. Identify the iSCSI SR to adjust. Document all settings.
  2. Shut down all guests using this iSCSI SR.
  3. Make sure you have all iSCSI settings documented.
  4. Right click on the iSCSI SR, select Detach.
  5. Right click on the iSCSI SR, select Reattach.
  6. Depending on your configuration, you may need to reenter some settings.

Expand using the Xen console

1. Shutdown all virtual machines on the SR.

2. Note the Universally Unique Identifier (UUID) of the Storage Repository. Use the xe sr-list command on the XenServer host and identify the SR by its name label.

3. Identify the Physical Block Device (PBD) UUID corresponding to the SR. Use the following command on XenServer:

    # xe sr-param-list uuid=|grep PBD
    where is the UUID of the SR noted in step 2.

4. Unplug the Physical Block Device (PBD) corresponding to the Storage Repository.

    # xe pbd-unplug uuid=
    where is the UUID of PBD noted in step 3.

5. Plug the PBD.

    # xe pbd-plug uuid=

6. Find the physical volume device SCSI device mapping name on which the SR exists.
Identify the Volume Group (VG) corresponding to the SR.
Issue the following command on XenServer host:

    # pvs

The output of this command should be similar to one below:

Fmt Attr PSize PFree
/dev/sdd VG_XenStorage-058e9a1d-9b7e-71bc-7a4c-5b78d6e30bcb lvm2 a- 80.00G 38.00G
/dev/sde VG_XenStorage-4684b6c6-be6d-6267-b7b5-834a1fd30f65 lvm2 a- 59.99G 45.99G

    The volume groups (VG) are named as VS_XenStorage-. Using the SR UUID noted in step 2, identify the correct volume group and the corresponding Physical Volume (PV) from the output of the above command.

7. Resize the Physical Volume:

    # pvresize /dev/sd

8. Scan the Storage Repository:

    # xe sr-scan uuid=


Conrad said...

While completing this exact same procedure I had trouble detaching my iSCSI storage repo. After googling i found your post and i knew i was on the right path. Still unable to detach(option not listed) I tried disabling multipathing. When you do that it actually unplugs the repo and replugs it. So if anyone else has that problem you can disable multipathing and re-enable it. That should to the trick.

core said...

I ran through the steps with XenCenter but found in the end that it didn't update the size. So, I ran through the command line instructions you gave and that worked. Could a person use the GUI steps 1-6 and then the CLI steps 6-8?

Chiv said...

This is my first time setting up XenServer and I'm also using MD3000i for SR. I'm wondering how you've got storage configured and whether I should be doing something different.

I've got:
6 x 300GB(ST3300656SS)
4 x 74GB(MBA3073RC)

I use the smaller 74GB drives in RAID1 (279GB Capacity) as my Virtual Disk for OS, creating all of my VMs out of this allocation.

The 6 x 300GB drives are in RAID5 and I use for data. I connect to this virtual disk using iSCSI from within my Windows VM set up as my file server.

Should I have just connected all of the storage directly to Xenserver and then used Xen to create storage for my file server? Haven't found much on best practice in this and stumbled upon your blog. Any advice would be really appreciated.

Jacob Ackerman said...


Unless you are a clustered server, I would allow XenServer to handle the data drives. This pushes the processing and network bandwidth off of that particular guest and on to the hypervisor.

Anonymous said...

"Very Goog"