Bug 642821 - virt-resize falls over on a disk image with a logical swap partition
virt-resize falls over on a disk image with a logical swap partition
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
: 632918 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-13 17:28 EDT by Adam Williamson
Modified: 2011-10-26 08:52 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-26 08:52:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Adam Williamson 2010-10-13 17:28:15 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).
Comment 1 Richard W.M. Jones 2010-10-16 09:36:34 EDT
*** Bug 632918 has been marked as a duplicate of this bug. ***
Comment 2 Richard W.M. Jones 2010-11-02 07:36:34 EDT
Sorry, this one is not going to make it for 1.6.
Comment 3 Richard W.M. Jones 2010-12-19 06:05:12 EST
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 13:52:24 EDT
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 13:40:10 EDT
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 08:52:57 EDT
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.