Red Hat Bugzilla – Bug 642821
virt-resize falls over on a disk image with a logical swap partition
Last modified: 2011-10-26 08:52:57 EDT
I had a 5GB disk image with the following layout:
vda1 primary / 4.5GB
vda2 extended rest of disk (500MB)
vda5 logical swap (logical partition part of vda2)
trying to run:
virt-resize --expand /dev/sda1 mailserver.qcow2 mailserver_new.qcow2
or, for that matter:
virt-resize --expand /dev/sda1 --ignore sda5 mailserver.qcow2 mailserver_new.qcow2
results in an error:
part_get_bootable: partition number out of range: 5 at /usr/bin/virt-resize line 610
this doesn't seem like something that should be beyond the realm of possibility. I worked around this by removing the swap partition and the extended partition and making the swap partition a primary partition, vda2, and it worked fine (well, didn't hit this bug, anyway).
*** Bug 632918 has been marked as a duplicate of this bug. ***
Sorry, this one is not going to make it for 1.6.
Sorry x 2, I think the fix for this is too invasive
since we're stabilizing the code to get to 1.8. We
should try to fix extended partitions in virt-resize
properly early in the 1.9 development series.
I'm afraid we're going to punt this one again.
Latest plan is to implement a library to handle MBR and GPT
which isn't quite as teeth-pulling as parted. Then we can
replace all the parted code with shiny-new-library code, and
implementing support for logical partitions will be a breeze.
Hopefully in the 1.11 development cycle.
As this bug hits its anniversary, we *really should fix it*.
Stops people from resizing Ubuntu guests, which is important
now that we have a credible Ubuntu package for libguestfs.
You will need virt-resize >= 1.13.25 which I'm going to
push out to Rawhide in a day or two.