Bug 887971 - pvcreate fails if partition contains a swap signature
Summary: pvcreate fails if partition contains a swap signature
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-17 17:38 UTC by Richard W.M. Jones
Modified: 2012-12-21 09:16 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-17 19:55:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-12-17 17:38:02 UTC
Description of problem:

$ guestfish -N part mkswap /dev/sda1 : pvcreate /dev/sda1
libguestfs: error: pvcreate: WARNING: swap signature detected on /dev/sda1. Wipe it? [y/n] 
  Aborting pvcreate on /dev/sda1.

But note that other content is fine.  For example if the
partition contained an ext2 filesystem before, then pvcreate works:

$ guestfish -N part mkfs ext2 /dev/sda1 : pvcreate /dev/sda1
[no error]

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

libguestfs 1.20.0

How reproducible:

100%

Steps to Reproduce:
See above.

Additional information:

For some reason this especially affects the test suite under
RHEL 7.  It may be that a combination of tests has been disabled,
such that when we come to test pvcreate there happens to be
a swap space signature on the partition.

Comment 1 Richard W.M. Jones 2012-12-17 19:55:49 UTC
Fixed upstream in:
https://github.com/libguestfs/libguestfs/commit/8237ac89c5b51490f3f3c6f44d35ecaa184dca05

Comment 2 Richard W.M. Jones 2012-12-21 09:16:29 UTC
With 1.20.1-2 package, this works.


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