Bug 1486777 - wipefs printing duplicate gpt clear messages
Summary: wipefs printing duplicate gpt clear messages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.4
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: Radka Skvarilova
URL:
Whiteboard:
Depends On:
Blocks: 1465901
TreeView+ depends on / blocked
 
Reported: 2017-08-30 14:12 UTC by John Pittman
Modified: 2018-04-10 17:26 UTC (History)
2 users (show)

Fixed In Version: util-linux-2.23.2-45.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 17:25:50 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0936 0 None None None 2018-04-10 17:26:58 UTC

Description John Pittman 2017-08-30 14:12:35 UTC
Description of problem:

The wipefs command is printing duplicate gpt clear messages.  When the command is run, it's actually clearing the primary gpt, the backup gpt, and the PMBR.

- Is this command expected to clear the PMBR?  I saw in bug 1054186, PMBR added in, but that is for expected use with '-a', not '-a -t <type>'.  If it is expected, we should be getting a print message for the PMBR being cleared.

- Is that extra gpt print message the tool actually clearing the PMBR and printing the wrong message?

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

kenrel-3.10.0-693.el7.x86_64
util-linux-2.23.2-43.el7.x86_64

Reproduction:

[root@localhost ~]# parted -s /dev/sdg mklabel gpt

[root@localhost ~]# parted -s /dev/sdg mkpart primary 0% 100%

[root@localhost ~]# parted /dev/sdg u s p
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sdg: 4194304s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start  End       Size      File system  Name     Flags
 1      2048s  4192255s  4190208s               primary

[root@localhost ~]# hexdump -C /dev/sdg | egrep 'EFI PART|55 aa'
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|
7ffffe00  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI PART....\...|

Note the extra print:

[root@localhost ~]# wipefs -a -t gpt /dev/sdg
/dev/sdg: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/sdg: 8 bytes were erased at offset 0x7ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdg: 8 bytes were erased at offset 0x7ffffe00 (gpt): 45 46 49 20 50 41 52 54
/dev/sdg: calling ioclt to re-read partition table: Success

And the lack of PMBR:

[root@localhost ~]# hexdump -C /dev/sdg | egrep 'EFI PART|55 aa'
[root@localhost ~]# 

Actual results:

Duplicate print messages for GPT label and no reference to PMBR.

Expected results:

If PMBR removal is expected, there should be a print for removal.  Duplicate print for GPT should be removed.

Comment 2 Karel Zak 2017-08-31 12:55:04 UTC
This is bug, PMBR should not be affected if "-t gpt" specified.

Fixed by upstream commit 0e45b256ac41257e920e1bcf61ff1a1b30ba5b98. This bugfix should be definitely backported to RHEL7.5.

Comment 12 errata-xmlrpc 2018-04-10 17:25:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0936


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