I'm running lvm in my Xen domU, and I can increase the size of a logical volume on the fly, and inside the domU I can increase the size of the filesystem on the fly to the size of the domU's block device, but without restarting the domU I can't actually get the domU's block device's size to update when the size of the logical volume it's pointing at changes.

Anyone have a hint or a convincing workaround (one that makes sense on a box where there are multiple domUs?)

  • Sorry, that's not very clear. I meant to say that I'm running LVM outside my domU and accessing a volume inside the domU via a phy: device.
    – rakslice
    Sep 16, 2009 at 16:20
  • I recently found out that there used to be an xm subcommand "block-refresh", but it was removed a long time ago. I still don't know why it was removed. osdir.com/ml/emulators.xen.cvs/2005-10/msg00088.html
    – rakslice
    Sep 16, 2009 at 16:31

2 Answers 2


I understand you are resizing an LV that is the block device of the DomU. I can't find any official answer to this but all my tests (Xen 3.2, Ubuntu Hardy) to make the guest recognize failed. My answer: Not possible.

Solution (copy and paste only with brain activated!):

  1. Dom0: sudo lvextend -L+10G /dev/vg/logical-volume
  2. Dom0: sudo xm shutdown -w the-domu
  3. Dom0: sudo xm create /etc/xen/the-domu.cfg
  4. DomU: sudo resize2fs /dev/xvda1

There's no real way that I know of, to rescan your disks in a domU without restarting the VM.

One solution that can be used, as you say you're using LVM in your domU's, is resizing the LV by attaching a new block device to the VM and resizing the Volume Group, instead of just resizing a current Physical Volume (PV).

Implementing that above scheme will allow you to attach new disks to the VM, "pvcreate" them and add them to the VG.

To avoid having many small attached disks, you can try adding a big block device that will also be able to cope with a "pvmove" on the VM. This will allow you to move data to the new block device, run a "vgreduce" and then detach to block device from the domU.

The downside, if you're also using LVM on your dom0, is a LVM->xvd->LVM chain. This will probably give you a small performance penalty, more complexity in managing and a non-trivial dom0 access to data in domU land (for backups, etc.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.