Bug 1344726 - [RFE] fdisk: output UID from gpt in fdisk when detecting that a gpt partition table is present
Summary: [RFE] fdisk: output UID from gpt in fdisk when detecting that a gpt partition...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: Radka Skvarilova
URL:
Whiteboard:
Depends On:
Blocks: 1380361
TreeView+ depends on / blocked
 
Reported: 2016-06-10 14:18 UTC by Dwight (Bud) Brown
Modified: 2017-08-01 21:41 UTC (History)
5 users (show)

Fixed In Version: util-linux-2.23.2-40.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:41:11 UTC
Target Upstream Version:


Attachments (Terms of Use)
patch to output disk_guid as "Disk identifier:" (2.70 KB, patch)
2016-06-10 17:14 UTC, Dwight (Bud) Brown
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2186 0 normal SHIPPED_LIVE util-linux bug fix and enhancement update 2017-08-01 18:41:36 UTC

Description Dwight (Bud) Brown 2016-06-10 14:18:30 UTC
Description of problem:

Under dos (mbr/sector0) partition type, a "Disk Identifier" is output:

Command (m for help): p

Disk /dev/sde: 3298.5 GB, 3298534883328 bytes, 6442450944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33550336 bytes
Disk label type: dos
Disk identifier: 0xd09b8758

   Device Boot      Start         End      Blocks   Id  System


Requesting similar functionality when gpt partition is detected, output 16 byte disk GUID:

Command (m for help): g
Building a new GPT disklabel (GUID: 8D696FCB-6DFD-483D-803F-A1AE80E900CD)


Command (m for help): p

Disk /dev/sde: 3298.5 GB, 3298534883328 bytes, 6442450944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33550336 bytes
Disk label type: gpt
                          <<< no disk identifier

#         Start          End    Size  Type            Name




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
no disk identifier (UID) from gpt table

Expected results:
Disk identifier: 8D696FCB-6DFD-483D-803F-A1AE80E900CD


Additional info:

Comment 1 Dwight (Bud) Brown 2016-06-10 17:14:30 UTC
Created attachment 1166690 [details]
patch to output disk_guid as "Disk identifier:"

sample output with patch applied:

# fdisk /dev/sde                                        
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sde: 3298.5 GB, 3298534883328 bytes, 6442450944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33550336 bytes
Disk label type: gpt
Disk identifier: A30A1734-C226-4FB0-8BE4-3CDD5FC595D9 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


#         Start          End    Size  Type            Name
 1   4831838136   6442450847    768G  Microsoft basic primary
 2        65528   3221225423    1.5T  Microsoft basic primary

Comment 2 Dwight (Bud) Brown 2016-06-10 17:15:25 UTC
patch is just one way of doing this, its not meant as a final patch.  

Just did the patch to show kinda what I was trying to describe.

Comment 3 Karel Zak 2016-10-12 09:22:31 UTC
Dwight, there is many features we can backport to RHEL-7.4 :-) Why we need this one? Do we have any use-case or customer's request?

Anyway, the patch looks good.

Comment 4 Dwight (Bud) Brown 2016-10-12 20:47:06 UTC
Customer has a case open on the first part of this (gpt partition type not being properly output/recognized, output specifies msdos instead). That's being handled by RHBZ 1344482. 

Disk label type: "dos => gpt  addressed for open customer case via 134482                           
Disk identifier: "0x0x00000000" => A30A1734-C226-4FB0-8BE4-3CDD5FC595D9 addressed with this bz.

Once that first one is fixed, I'm expecting the customer to notice the disk identifier string doesn't match their expectations.  So this is anticipatory based on that.

Once those two visible pieces are corrected, then the common visual pieces will be addressed and reflect gpt and its identifier string correctly.

Comment 14 errata-xmlrpc 2017-08-01 21:41:11 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-2017:2186


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