Re: [Libguestfs] [libvirt-users] Resize errors with virt-resize/vgchange
On 07/21/2013 07:01 PM, Alex wrote:
Hi,
I have an fc18 system and trying to resize an LVM partition with an ext4 filesystem and receiving the following message from virt-resize:
virt-resize is part of libguestfs, which is layered on top of libvirt. As such, I'm redirecting this mail to the libguestfs mailing list.
# virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img command line: virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img Examining prop-1.img ... libguestfs: trace: add_drive "prop-1.img" "readonly:true" libguestfs: trace: add_drive = 0 libguestfs: trace: add_drive "prop-expand.img" "readonly:false" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" libguestfs: trace: disk_format = "raw" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" [...] 100% --:-- libguestfs: trace: launch = 0 libguestfs: trace: lvm_set_filter "/dev/sda" libguestfs: trace: lvm_set_filter = -1 (error) Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. Refusing activation of partial LV home. Use --partial to override. Refusing activation of partial LV swap. Use --partial to override. R libguestfs: trace: close libguestfs: trace: internal_autosync libguestfs: trace: internal_autosync = 0
I don't understand this error message. I also see that vgchange doesn't even have a 'partial' option, so I'm not sure how to troubleshoot it. Here is the filesystem layout for this system:
# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 7.9G 3.9M 7.9G 1% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/prop-root 15G 7.4G 6.3G 55% / tmpfs 7.9G 0 7.9G 0% /tmp /dev/mapper/prop-boot 477M 95M 358M 21% /boot /dev/mapper/prop-home 222G 212G 9.9G 96% /home
The image is the 222G /home partition only. The other partitions are on another image.
Any ideas how to troubleshoot this would be greatly appreciated. Thanks, Alex
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
On Mon, Jul 22, 2013 at 10:18:21AM -0600, Eric Blake wrote:
On 07/21/2013 07:01 PM, Alex wrote:
Hi,
I have an fc18 system and trying to resize an LVM partition with an ext4 filesystem and receiving the following message from virt-resize:
virt-resize is part of libguestfs, which is layered on top of libvirt. As such, I'm redirecting this mail to the libguestfs mailing list.
# virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img command line: virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img Examining prop-1.img ... libguestfs: trace: add_drive "prop-1.img" "readonly:true" libguestfs: trace: add_drive = 0 libguestfs: trace: add_drive "prop-expand.img" "readonly:false" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" libguestfs: trace: disk_format = "raw" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" [...] 100% --:-- libguestfs: trace: launch = 0 libguestfs: trace: lvm_set_filter "/dev/sda" libguestfs: trace: lvm_set_filter = -1 (error) Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. Refusing activation of partial LV home. Use --partial to override. Refusing activation of partial LV swap. Use --partial to override. R libguestfs: trace: close libguestfs: trace: internal_autosync libguestfs: trace: internal_autosync = 0
I don't understand this error message. I also see that vgchange doesn't even have a 'partial' option, so I'm not sure how to troubleshoot it. Here is the filesystem layout for this system:
Which version of libguestfs, and where did you install it from? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Hi,
# virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img command line: virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img Examining prop-1.img ... libguestfs: trace: add_drive "prop-1.img" "readonly:true" libguestfs: trace: add_drive = 0 libguestfs: trace: add_drive "prop-expand.img" "readonly:false" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" libguestfs: trace: disk_format = "raw" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" [...] 100% --:-- libguestfs: trace: launch = 0 libguestfs: trace: lvm_set_filter "/dev/sda" libguestfs: trace: lvm_set_filter = -1 (error) Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. Refusing activation of partial LV home. Use --partial to override. Refusing activation of partial LV swap. Use --partial to override. R libguestfs: trace: close libguestfs: trace: internal_autosync libguestfs: trace: internal_autosync = 0
I don't understand this error message. I also see that vgchange doesn't even have a 'partial' option, so I'm not sure how to troubleshoot it. Here is the filesystem layout for this system:
Which version of libguestfs, and where did you install it from?
It was installed via yum on fedora18: # rpm -qva|grep guest libguestfs-tools-c-1.20.9-1.fc18.x86_64 libguestfs-tools-1.20.9-1.fc18.x86_64 libguestfs-1.20.9-1.fc18.x86_64 Thanks so much, Alex
On Tue, Jul 23, 2013 at 03:10:07PM -0400, Alex wrote:
Hi,
# virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img command line: virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img Examining prop-1.img ... libguestfs: trace: add_drive "prop-1.img" "readonly:true" libguestfs: trace: add_drive = 0 libguestfs: trace: add_drive "prop-expand.img" "readonly:false" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" libguestfs: trace: disk_format = "raw" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" [...] 100% --:-- libguestfs: trace: launch = 0 libguestfs: trace: lvm_set_filter "/dev/sda" libguestfs: trace: lvm_set_filter = -1 (error) Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. Refusing activation of partial LV home. Use --partial to override. Refusing activation of partial LV swap. Use --partial to override. R libguestfs: trace: close libguestfs: trace: internal_autosync libguestfs: trace: internal_autosync = 0
I don't understand this error message. I also see that vgchange doesn't even have a 'partial' option, so I'm not sure how to troubleshoot it. Here is the filesystem layout for this system:
Which version of libguestfs, and where did you install it from?
It was installed via yum on fedora18:
# rpm -qva|grep guest libguestfs-tools-c-1.20.9-1.fc18.x86_64 libguestfs-tools-1.20.9-1.fc18.x86_64 libguestfs-1.20.9-1.fc18.x86_64
OK, in that case it's (unfortunately) not what I was thinking it was :-( If you set: export LIBGUESTFS_DEBUG=1 before running virt-resize then you will get a huge amount of extra debugging, which could be very valuable. If you post that lot somewhere it would be helpful. However it's definitely a bug of some sort. I will open a Bugzilla bug later unless you get there first. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Hi,
# virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img command line: virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img Examining prop-1.img ... libguestfs: trace: add_drive "prop-1.img" "readonly:true" libguestfs: trace: add_drive = 0 libguestfs: trace: add_drive "prop-expand.img" "readonly:false" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" libguestfs: trace: disk_format = "raw" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" [...] 100% --:-- libguestfs: trace: launch = 0 libguestfs: trace: lvm_set_filter "/dev/sda" libguestfs: trace: lvm_set_filter = -1 (error) Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. Refusing activation of partial LV home. Use --partial to override. Refusing activation of partial LV swap. Use --partial to override. R libguestfs: trace: close libguestfs: trace: internal_autosync libguestfs: trace: internal_autosync = 0
I don't understand this error message. I also see that vgchange doesn't even have a 'partial' option, so I'm not sure how to troubleshoot it. Here is the filesystem layout for this system:
Which version of libguestfs, and where did you install it from?
It was installed via yum on fedora18:
# rpm -qva|grep guest libguestfs-tools-c-1.20.9-1.fc18.x86_64 libguestfs-tools-1.20.9-1.fc18.x86_64 libguestfs-1.20.9-1.fc18.x86_64
OK, in that case it's (unfortunately) not what I was thinking it was :-(
If you set:
export LIBGUESTFS_DEBUG=1
before running virt-resize then you will get a huge amount of extra debugging, which could be very valuable. If you post that lot somewhere it would be helpful.
However it's definitely a bug of some sort. I will open a Bugzilla bug later unless you get there first.
It's going to take me a bit of time to retest this with debugging info. This happened during a production change window I was given for this. I have the images backed up on another server for testing, but will take me a day or two. I'd appreciate it if you would open the bug to get us started and in front of some other people... Come to think of it, considering it's a bug, how are other people resizing VMs with LVM partitions? Should I plan to find an alternate method to do this? Thanks, Alex
On Tue, Jul 23, 2013 at 07:18:30PM -0400, Alex wrote:
Hi,
# virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img command line: virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home prop-1.img prop-expand.img Examining prop-1.img ... libguestfs: trace: add_drive "prop-1.img" "readonly:true" libguestfs: trace: add_drive = 0 libguestfs: trace: add_drive "prop-expand.img" "readonly:false" libguestfs: trace: add_drive = 0 libguestfs: trace: launch libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" libguestfs: trace: disk_format = "raw" libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" [...] 100% --:-- libguestfs: trace: launch = 0 libguestfs: trace: lvm_set_filter "/dev/sda" libguestfs: trace: lvm_set_filter = -1 (error) Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. Refusing activation of partial LV home. Use --partial to override. Refusing activation of partial LV swap. Use --partial to override.
Does this guest have multiple disks?
libguestfs: trace: close libguestfs: trace: internal_autosync libguestfs: trace: internal_autosync = 0
I don't understand this error message. I also see that vgchange doesn't even have a 'partial' option, so I'm not sure how to troubleshoot it. Here is the filesystem layout for this system:
Which version of libguestfs, and where did you install it from?
It was installed via yum on fedora18:
# rpm -qva|grep guest libguestfs-tools-c-1.20.9-1.fc18.x86_64 libguestfs-tools-1.20.9-1.fc18.x86_64 libguestfs-1.20.9-1.fc18.x86_64
OK, in that case it's (unfortunately) not what I was thinking it was :-(
If you set:
export LIBGUESTFS_DEBUG=1
before running virt-resize then you will get a huge amount of extra debugging, which could be very valuable. If you post that lot somewhere it would be helpful.
However it's definitely a bug of some sort. I will open a Bugzilla bug later unless you get there first.
It's going to take me a bit of time to retest this with debugging info. This happened during a production change window I was given for this. I have the images backed up on another server for testing, but will take me a day or two. I'd appreciate it if you would open the bug to get us started and in front of some other people...
I opened the bug: https://bugzilla.redhat.com/show_bug.cgi?id=987829 Please add the debug information when you can.
Come to think of it, considering it's a bug, how are other people resizing VMs with LVM partitions? Should I plan to find an alternate method to do this?
I've never seen this problem when resizing VMs with logical volumes before. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Hi,
> # virt-resize -d --expand /dev/sda1 --LV-expand /dev/mapper/prop-home > prop-1.img prop-expand.img > command line: virt-resize -d --expand /dev/sda1 --LV-expand > /dev/mapper/prop-home prop-1.img prop-expand.img > Examining prop-1.img ... > libguestfs: trace: add_drive "prop-1.img" "readonly:true" > libguestfs: trace: add_drive = 0 > libguestfs: trace: add_drive "prop-expand.img" "readonly:false" > libguestfs: trace: add_drive = 0 > libguestfs: trace: launch > libguestfs: trace: get_tmpdir > libguestfs: trace: get_tmpdir = "/tmp" > libguestfs: trace: get_cachedir > libguestfs: trace: get_cachedir = "/var/tmp" > libguestfs: trace: disk_format "/var/lib/libvirt/images/prop-expand.img" > libguestfs: trace: disk_format = "raw" > libguestfs: trace: get_cachedir > libguestfs: trace: get_cachedir = "/var/tmp" > [...] 100% --:-- > libguestfs: trace: launch = 0 > libguestfs: trace: lvm_set_filter "/dev/sda" > libguestfs: trace: lvm_set_filter = -1 (error) > Fatal error: exception Guestfs.Error("lvm_set_filter: vgchange: > Couldn't find device with uuid zouQ8X-qxqJ-mp6p-pzg3-mi2i-K9YM-A763Kc. > Refusing activation of partial LV home. Use --partial to override. > Refusing activation of partial LV swap. Use --partial to override.
Does this guest have multiple disks?
Yes, here's the layout from the vm: # df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 7.9G 643M 7.3G 9% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/prop-root 15G 11G 2.9G 79% / tmpfs 7.9G 12K 7.9G 1% /tmp /dev/mapper/prop-boot 477M 95M 358M 21% /boot /dev/mapper/prop-home 222G 215G 7.6G 97% /home I'll add this info to the bug report. I've got 7.6G left. I think I'll attach a new disk with enough space and copy the contents over so I can keep the system running. I'll hopefully be able to work on the bug soon too. Thanks, Alex
On Wed, Jul 24, 2013 at 02:57:58PM -0400, Alex wrote:
Yes, here's the layout from the vm:
# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 7.9G 643M 7.3G 9% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/prop-root 15G 11G 2.9G 79% / tmpfs 7.9G 12K 7.9G 1% /tmp /dev/mapper/prop-boot 477M 95M 358M 21% /boot /dev/mapper/prop-home 222G 215G 7.6G 97% /home
I'll add this info to the bug report.
Just to be clear, it has multiple virtual block devices, eg. /dev/vda and /dev/vdb ...? This isn't (currently) a supported configuration for virt-resize, although it ought to be. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Hi,
Yes, here's the layout from the vm:
# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 7.9G 643M 7.3G 9% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/prop-root 15G 11G 2.9G 79% / tmpfs 7.9G 12K 7.9G 1% /tmp /dev/mapper/prop-boot 477M 95M 358M 21% /boot /dev/mapper/prop-home 222G 215G 7.6G 97% /home
I'll add this info to the bug report.
Just to be clear, it has multiple virtual block devices, eg. /dev/vda and /dev/vdb ...?
This isn't (currently) a supported configuration for virt-resize, although it ought to be.
Yes, that's correct - vda and vdb. Not sure how I missed that previously. Can I perform the steps that virt-resize executes manually instead, and either perform it only on the one to be resized or otherwise adjust the arguments accordingly? Is it documented? Thanks, Alex
On Wed, Jul 24, 2013 at 10:32:08PM -0400, Alex wrote:
Hi,
Yes, here's the layout from the vm:
# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 7.9G 643M 7.3G 9% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/prop-root 15G 11G 2.9G 79% / tmpfs 7.9G 12K 7.9G 1% /tmp /dev/mapper/prop-boot 477M 95M 358M 21% /boot /dev/mapper/prop-home 222G 215G 7.6G 97% /home
I'll add this info to the bug report.
Just to be clear, it has multiple virtual block devices, eg. /dev/vda and /dev/vdb ...?
This isn't (currently) a supported configuration for virt-resize, although it ought to be.
Yes, that's correct - vda and vdb. Not sure how I missed that previously.
Can I perform the steps that virt-resize executes manually instead, and either perform it only on the one to be resized or otherwise adjust the arguments accordingly? Is it documented?
No; virt-resize has to be changed to work with multiple disks. There is no workaround. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
On Wed, Jul 24, 2013 at 10:32:08PM -0400, Alex wrote:
Hi,
Yes, here's the layout from the vm:
# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.9G 0 7.9G 0% /dev tmpfs 7.9G 0 7.9G 0% /dev/shm tmpfs 7.9G 643M 7.3G 9% /run tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup /dev/mapper/prop-root 15G 11G 2.9G 79% / tmpfs 7.9G 12K 7.9G 1% /tmp /dev/mapper/prop-boot 477M 95M 358M 21% /boot /dev/mapper/prop-home 222G 215G 7.6G 97% /home
I'll add this info to the bug report.
Just to be clear, it has multiple virtual block devices, eg. /dev/vda and /dev/vdb ...?
This isn't (currently) a supported configuration for virt-resize, although it ought to be.
Yes, that's correct - vda and vdb. Not sure how I missed that previously.
Can I perform the steps that virt-resize executes manually instead, and either perform it only on the one to be resized or otherwise adjust the arguments accordingly? Is it documented?
Ignore my previous answer ... Yes, you could do the steps manually. However it's a massive PITA which is why virt-resize exists in the first place. You would have to do something like: guestfish
<fs> add-ro prop-1.img # sda <fs> add-ro prop-2.img # sdb <fs> sparse prop-expand.img <SIZE> # sdc <fs> run <fs> part-list /dev/sda
Followed by commands to create the partitions/PVs/VGs/LVs on sdc:
<fs> part-init /dev/sdc mbr <fs> part-add /dev/sdc p <#1...> <fs> part-add /dev/sdc p <#2...> <fs> pvcreate /dev/sdc2 <fs> vgcreate prop2 /dev/sdc2 <fs> lvcreate root prop2 <#3> <fs> lvcreate-free home prop2 100
#1: choose same sector parameters as output of part-list above #2: start at same place as second sector on /dev/sda, end at end of disk #3: choose same size as original root disk Note you have to rename the VG. virt-resize itself does some complex trickery to avoid this. If you rename the VG, you will need to also edit /etc/fstab in the guest accordingly. Followed by commands to copy the data from the original filesystems over, eg.:
<fs> copy-device-to-device /dev/prop/root /dev/prop2/root <fs> resize2fs /dev/prop2/root
Then, boot the resulting disk in virt-rescue, mount all the partitions up on /sysroot, chroot into /sysroot, and run grub from the guest to install the bootloader. Edit /etc/fstab if required. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
participants (3)
-
Alex -
Eric Blake -
Richard W.M. Jones