Bug 642821 - virt-resize falls over on a disk image with a logical swap partition
Summary: virt-resize falls over on a disk image with a logical swap partition
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
: 632918 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-13 21:28 UTC by Adam Williamson
Modified: 2011-10-26 12:52 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-10-26 12:52:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2010-10-13 21:28:15 UTC
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).

Comment 1 Richard W.M. Jones 2010-10-16 13:36:34 UTC
*** Bug 632918 has been marked as a duplicate of this bug. ***

Comment 2 Richard W.M. Jones 2010-11-02 11:36:34 UTC
Sorry, this one is not going to make it for 1.6.

Comment 3 Richard W.M. Jones 2010-12-19 11:05:12 UTC
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.

Comment 4 Richard W.M. Jones 2011-04-12 17:52:24 UTC
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.

Comment 5 Richard W.M. Jones 2011-10-14 17:40:10 UTC
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.

Comment 6 Richard W.M. Jones 2011-10-26 12:52:57 UTC
Fixed(!)

You will need virt-resize >= 1.13.25 which I'm going to
push out to Rawhide in a day or two.


Note You need to log in before you can comment on or make changes to this bug.