GNU bug report logs - #30773
parted doesn't thoroughly erase old signatures

Previous Next

Package: parted;

Reported by: Anatoly Mayorov <mt45 <at> yandex.ru>

Date: Sun, 11 Mar 2018 23:21:01 UTC

Severity: normal

To reply to this bug, email your comments to 30773 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#30773; Package parted. (Sun, 11 Mar 2018 23:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anatoly Mayorov <mt45 <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Sun, 11 Mar 2018 23:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anatoly Mayorov <mt45 <at> yandex.ru>
To: bug-parted <at> gnu.org
Subject: parted doesn't thoroughly erase old signatures
Date: Sun, 11 Mar 2018 21:46:24 +0300
[Message part 1 (text/plain, inline)]
Hi,

I installed TrueOS and it partitioned the whole disk as a zfs pool. Then, while installing Archlinux I used parted to create a new gpt table with fat32, ext4 and btrfs partitions. Archlinux worked well. But Gparted reported, that the whole disk still was formatted to ZFS. I reproduced the same scenario on a virtual machine - the same result.
It turned out that there remained signatures from ZFS.
Here is what blkid and wipes reported:

root <at> debian:~# blkid /dev/sda
/dev/sda: TYPE="zfs_member" PTUUID="f80e1ce2-028f-4124-bdef-ce5a61ad4e72" PTTYPE="gpt"

root <at> debian:~# wipefs /dev/sda
offset type
----------------------------------------------------------------
0x200 gpt [partition table]

0x7f000 zfs_member [filesystem]

I had to manually erase all old signatures with wipefs to make Gparted see my partitions.

I'm attaching a screenshot of the virtual machine where I reproduced the scenario.
[gparted-qemu.png (image/png, attachment)]

Information forwarded to bug-parted <at> gnu.org:
bug#30773; Package parted. (Thu, 07 Jun 2018 15:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 30773 <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Anatoly Mayorov <mt45 <at> yandex.ru>
Cc: 30773 <at> debbugs.gnu.org
Subject: Re: bug#30773: parted doesn't thoroughly erase old signatures
Date: Thu, 7 Jun 2018 08:23:00 -0700
On Sun, Mar 11, 2018 at 09:46:24PM +0300, Anatoly Mayorov wrote:
> Hi,
> 
> I installed TrueOS and it partitioned the whole disk as a zfs pool. Then, while installing Archlinux I used parted to create a new gpt table with fat32, ext4 and btrfs partitions. Archlinux worked well. But Gparted reported, that the whole disk still was formatted to ZFS. I reproduced the same scenario on a virtual machine - the same result.
> It turned out that there remained signatures from ZFS.
> Here is what blkid and wipes reported:
> 
> root <at> debian:~# blkid /dev/sda
> /dev/sda: TYPE="zfs_member" PTUUID="f80e1ce2-028f-4124-bdef-ce5a61ad4e72" PTTYPE="gpt"
> 
> root <at> debian:~# wipefs /dev/sda
> offset type
> ----------------------------------------------------------------
> 0x200 gpt [partition table]
> 
> 0x7f000 zfs_member [filesystem]
> 
> I had to manually erase all old signatures with wipefs to make Gparted see my partitions.
> 
> I'm attaching a screenshot of the virtual machine where I reproduced the scenario.

parted doesn't wipe signatures. Use something like wipefs for that :)

This can also be a problem with RAID and LVM and recreating partitions with the
same sizes, you'll sometimes see old ones show up. So when re-using a
disk it's best to also wipefs it first.

-- 
Brian C. Lane (PST8PDT)




Information forwarded to bug-parted <at> gnu.org:
bug#30773; Package parted. (Mon, 18 Jun 2018 16:30:03 GMT) Full text and rfc822 format available.

Message #11 received at 30773 <at> debbugs.gnu.org (full text, mbox):

From: Phillip Susi <psusi <at> ubuntu.com>
To: "Brian C. Lane" <bcl <at> redhat.com>, Anatoly Mayorov <mt45 <at> yandex.ru>
Cc: 30773 <at> debbugs.gnu.org
Subject: Re: bug#30773: parted doesn't thoroughly erase old signatures
Date: Mon, 18 Jun 2018 12:29:12 -0400
[Message part 1 (text/plain, inline)]
On 6/7/2018 11:23 AM, Brian C. Lane wrote:
> parted doesn't wipe signatures. Use something like wipefs for that :)

Sure it does; see ped_disk_clobber().  It wipes the first and last 8k of
the disk, which gets most signatures, but I'm guessing ZFS is not in
that range.  LVM is another oddly placed one iirc.



[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 7 years and 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.