Red Hat Bugzilla – Bug 1486777
wipefs printing duplicate gpt clear messages
Last modified: 2018-04-10 13:26:58 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.
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.
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