Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1486777 - wipefs printing duplicate gpt clear messages
wipefs printing duplicate gpt clear messages
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux (Show other bugs)
7.4
All Linux
unspecified Severity low
: rc
: ---
Assigned To: Karel Zak
Radka Skvarilova
:
Depends On:
Blocks: 1465901
  Show dependency treegraph
 
Reported: 2017-08-30 10:12 EDT by John Pittman
Modified: 2018-04-10 13:26 EDT (History)
2 users (show)

See Also:
Fixed In Version: util-linux-2.23.2-45.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 13:25:50 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0936 None None None 2018-04-10 13:26 EDT

  None (edit)
Description John Pittman 2017-08-30 10:12:35 EDT
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 08:55:04 EDT
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 13:25:50 EDT
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.