Bug 1285847 - virt-resize does not copy logical partitions
virt-resize does not copy logical partitions
Status: CLOSED ERRATA
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-26 11:27 EST by Richard W.M. Jones
Modified: 2015-12-16 04:53 EST (History)
3 users (show)

See Also:
Fixed In Version: libguestfs-1.30.5-2.fc23 libguestfs-1.30.5-2.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-05 20:22:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2015-11-26 11:27:02 EST
Description of problem:

Either run virt-resize on a disk with logical partitions, or use
this simple reproducer which does the same thing:

$ virt-builder ubuntu-14.04 --size 20G

After that runs, use virt-filesystems to examine the disk:

$ virt-filesystems -a ubuntu-14.04.img --all --long -h
Name       Type        VFS      Label  MBR  Size  Parent
/dev/sda1  filesystem  ext4     -      -    19G   -
/dev/sda2  filesystem  unknown  -      -    1.0K  -
/dev/sda1  partition   -        -      83   19G   /dev/sda
/dev/sda2  partition   -        -      05   1.0K  /dev/sda
/dev/sda   device      -        -      -    20G   -

Compare this to a non-resized Ubuntu image and you can
see that virt-resize has deleted the /dev/sda5 (swap) partition:

Name       Type        VFS      Label  MBR  Size   Parent
/dev/sda1  filesystem  ext4     -      -    3.0G   -
/dev/sda2  filesystem  unknown  -      -    1.0K   -
/dev/sda5  filesystem  swap     -      -    1022M  -
/dev/sda1  partition   -        -      83   3.0G   /dev/sda
/dev/sda2  partition   -        -      05   1.0K   /dev/sda
/dev/sda5  partition   -        -      82   1022M  /dev/sda
/dev/sda   device      -        -      -    4.0G   -

Version-Release number of selected component (if applicable):

libguestfs-1.30.5
libguestfs-1.31.28

How reproducible:

100%

Steps to Reproduce:

See above.

Additional info:

Original bug report from 'mvo' here:
https://bodhi.fedoraproject.org/updates/libguestfs-1.30.5-1.fc23#comment-358003
Comment 1 Richard W.M. Jones 2015-11-27 05:34:04 EST
It turns out this is actually caused by the recent sfdisk rewrite,
so it probably affects other versions of libguestfs too.

However I have posted a fix:

https://www.redhat.com/archives/libguestfs/2015-November/msg00203.html
https://www.redhat.com/archives/libguestfs/2015-November/msg00204.html
Comment 2 Fedora Update System 2015-11-28 02:15:42 EST
libguestfs-1.30.5-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-943e9fb63b
Comment 3 Fedora Update System 2015-11-28 02:15:46 EST
libguestfs-1.30.5-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-1bf4cbf156
Comment 4 Fedora Update System 2015-11-28 19:54:15 EST
libguestfs-1.30.5-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update libguestfs'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-1bf4cbf156
Comment 5 Fedora Update System 2015-11-28 21:22:54 EST
libguestfs-1.30.5-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update libguestfs'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-943e9fb63b
Comment 6 Fedora Update System 2015-12-05 20:21:51 EST
libguestfs-1.30.5-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2015-12-16 04:53:08 EST
libguestfs-1.30.5-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

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