[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] resize disk image partition

  • To: Kristoffer Harthing Egefelt <k@xxxxxxx>
  • From: "Fajar A. Nugraha" <list@xxxxxxxxx>
  • Date: Fri, 24 Aug 2012 19:36:42 +0700
  • Cc: xen-users@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 24 Aug 2012 12:37:49 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

On Fri, Aug 24, 2012 at 7:00 PM, Kristoffer Harthing Egefelt <k@xxxxxxx> wrote:
> I'm trying to clarify if it's at all possible to live resize a disk image.

Sure it is.

> After trying and failing it seems that the reason a disk image cannot be
> resized - is that domU is only able to detect changes in partitions (eg.
> partprobe), not in block devices as the xvd driver lacks a rescan feature.

It works automatically if both your xen and domU kernel is new enough.

> My domU sees disk images as blockdevices - that is without a partition
> table,

That works. In fact, it's probably the only way the online disk resize
would be useful. If it's on a partition, you wouldn't be able to tell
the kernel that the partition has changed. Not yet anyway.

> and I cannot find a way to boot a domU from a partition within a disk
> image?

Sure you can. The default image created using virt-install (and thus,
the OS installer) has /boot on a partition by default.

> But if I could get XEN to boot a domU from a partition on a disk image, I
> assume the domU via partprobe would see if I resized the partition and could
> then resize the filesystem?

Nope. You can online-resize the virtual disk, but you can't
online-resize the partition. At least for now.

> Or would it be considered bad practice to modify partitions in a disk image
> from dom0 while domU is running?


> What do you think - is it impossible to live resize a disk image/partition?

Not impossible. Just not recommended.

> I'd really like to avoid LVM.

It's the only supported way of online resizing. To add a new disk, and
add the disk as PV.

Other methods, including the partitionless-disk-resize, is either not
recommended, requires some special setup, or simply don't work.


Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.