Bug 1487031

Summary: [GSS][RFE]The Ceph disk type is unknown then we run the command "fdisk -l"
Product: Red Hat Enterprise Linux 7 Reporter: liuwei <wliu>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: Radka Brychtova <rskvaril>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.3CC: bhubbard, ovasik, rskvaril
Target Milestone: pre-dev-freezeKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: util-linux-2.23.2-44.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 17:25:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1465901    
Attachments:
Description Flags
unknown picture none

Description liuwei 2017-08-31 05:50:57 UTC
Description of problem:
The Ceph disk type is unknown then we run the command "fdisk -l". For example:

 mount | grep ceph
/dev/vdd1 on /var/lib/ceph/osd/ceph-6 type xfs (rw,noatime,seclabel,swalloc,attr2,largeio,inode64,noquota)
/dev/vdc1 on /var/lib/ceph/osd/ceph-4 type xfs (rw,noatime,seclabel,swalloc,attr2,largeio,inode64,noquota)
/dev/vdb1 on /var/lib/ceph/osd/ceph-0 type xfs (rw,noatime,seclabel,swalloc,attr2,largeio,inode64,noquota)

fdisk -l 

Disk /dev/vda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a6370

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048     2099199     1048576   83  Linux
/dev/vda2         2099200    62914559    30407680   8e  Linux LVM
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/vdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1     10487808    104857566     45G  unknown         ceph data
 2         2048     10487807      5G  unknown         ceph journal
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/vdc: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1     10487808    104857566     45G  unknown         ceph data
 2         2048     10487807      5G  unknown         ceph journal
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/vdd: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1     10487808    104857566     45G  unknown         ceph data
 2         2048     10487807      5G  unknown         ceph journal

Disk /dev/mapper/rhel_vm219--50-root: 27.9 GB, 27913093120 bytes, 54517760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/rhel_vm219--50-swap: 3221 MB, 3221225472 bytes, 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes



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


How reproducible:

100% reproduced 

Steps to Reproduce:
1.
2.
3.

Actual results:

The disk type is unknown if we check the all disk information with "fdisk -l " command. 

Expected results:

We can show the correctly information for it .

Additional info:

Comment 2 liuwei 2017-08-31 05:54:49 UTC
Created attachment 1320455 [details]
unknown picture

Comment 3 Brad Hubbard 2017-08-31 22:45:14 UTC
In rhel7 the partition GUID is clearly set correctly and matches https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs

$ sudo sgdisk --info=1 /dev/sdb          
Partition GUID code: 4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D (Unknown) <----NOTE                                                  
Partition unique GUID: 008B0A93-F321-487B-AA95-021F4D1397A5                                                           
First sector: 4196352 (at 2.0 GiB)                         
Last sector: 583983070 (at 278.5 GiB)                      
Partition size: 579786719 sectors (276.5 GiB)              
Attribute flags: 0000000000000000                          
Partition name: 'ceph data'

The fact that fdisk (and sgdisk for that matter) on rhel7 do not recognise this partition GUID code is a deficiency in the versions of the tools on rhel7 IMHO.

If we compare this behaviour to Fedora 25 for example we see the following.

$ sudo sgdisk --info=1 /dev/vdb
Partition GUID code: 4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D (Ceph OSD) <----NOTE
Partition unique GUID: B9897115-9FAD-49BA-8481-FE1907EB1067
First sector: 10487808 (at 5.0 GiB)
Last sector: 419430366 (at 200.0 GiB)
Partition size: 408942559 sectors (195.0 GiB)
Attribute flags: 0000000000000000
Partition name: 'ceph data'

$ sudo fdisk -l /dev/vdb
Disk /dev/vdb: 200 GiB, 214748364800 bytes, 419430400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FCCB72B7-95B8-4A87-979E-FA7ACBAC6FD2

Device        Start       End   Sectors  Size Type
/dev/vdb1  10487808 419430366 408942559  195G Ceph OSD
/dev/vdb2      2048  10487807  10485760    5G Ceph Journal

I would suggest changing this bug to be against fdisk (and sgdisk).

Comment 5 Karel Zak 2017-09-01 08:42:13 UTC
Fixed by upstream commit 5aa8d13b13c3c8eddbd9176ef493dfa70a10616b. It's trivial change.

Comment 14 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