Hi, I''m trying to clarify if it''s at all possible to live resize a disk image. 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. My domU sees disk images as blockdevices - that is without a partition table, and I cannot find a way to boot a domU from a partition within a disk image? 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? 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? I''d really like to avoid LVM. Thanks Regards Kristoffer -- View this message in context: http://xen.1045712.n5.nabble.com/resize-disk-image-partition-tp5710813.html Sent from the Xen - User mailing list archive at Nabble.com.
On Fri, Aug 24, 2012 at 7:00 PM, Kristoffer Harthing Egefelt <k@itoc.dk> 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?Yep> 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. -- Fajar
> Sure it is.Great!>It works automatically if both your xen and domU kernel is new enough.I''m running debian sid with 3.2.0-2-amd64 on both dom0 and domU and xen 4.1. Do you know if this version should work?> Other methods, including the partitionless-disk-resize, is either not > recommended, > requires some special setup, or simply don''t work.Could you tell me why the image resize is a bad idea compared to LVM? Unstable, errorprone commands or..? I''d like to test the resize of disk images thoroughly before going for a LVM setup - the whole setup seems much simpler without LVM and all it''s duplicate UUIDs etc... Thanks ;-) -- View this message in context: http://xen.1045712.n5.nabble.com/resize-disk-image-partition-tp5710813p5710815.html Sent from the Xen - User mailing list archive at Nabble.com.