Bug 1275135 - RHEL6: "sfdisk -s" can't list the disk size
RHEL6: "sfdisk -s" can't list the disk size
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng (Show other bugs)
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Karel Zak
Vaclav Danek
Depends On:
Blocks: 1356047 1359260 1402825
  Show dependency treegraph
Reported: 2015-10-25 23:58 EDT by wangleziji
Modified: 2017-03-21 07:26 EDT (History)
3 users (show)

See Also:
Fixed In Version: util-linux-ng-2.17.2-12.26.el6
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1402825 (view as bug list)
Last Closed: 2017-03-21 07:26:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
the actual result (12.08 KB, image/png)
2015-10-26 00:04 EDT, wangleziji
no flags Details

  None (edit)
Description wangleziji 2015-10-25 23:58:49 EDT
Description of problem:
when the disk size is 1073741823 blocks(about 1T), the sfdisk -s can't list the disk size

Version-Release number of selected component (if applicable):
sfdisk (util-linux-ng 2.17.2)

How reproducible:
every time

Steps to Reproduce:
1.create a system with the disk size 1099511626752 bytes(1073741823 blocks)
2.run "sfdisk -s"

Actual results:
#sfdisk -s
/dev/mapper/vg_sunch07test-LogVol00:  20475904
total: 20475904 blocks

Expected results:
# sfdisk -s
/dev/sda:  1073741823
/dev/mapper/vg_sunch07test-LogVol00:  20475904
total: 1094217727 blocks

Additional info:
From the sfdisk.c source code, we can see when the disk size is 1073741823, it will return immediately. But "sfdisk -s /dev/sda" can works well.
 /* a CDROM drive without mounted CD yields MAXINT */
2819     if (silent && size == ((1<<30)-1))
2820       return;
Comment 2 wangleziji 2015-10-26 00:04 EDT
Created attachment 1086374 [details]
the actual result
Comment 3 Karel Zak 2015-10-27 06:28:43 EDT
It really seems like crazy heuristic. Thanks for your report.
Comment 4 wangleziji 2015-11-08 22:43:55 EST
Is there any update for this issue? Thanks.
Comment 5 Karel Zak 2015-11-09 03:25:40 EST
wangleziji, bugzilla is not the right place where you can ask 
for official RHEL support. Please, use support.redhat.com. I cannot promise any schedule for this bug. Thanks.
Comment 12 errata-xmlrpc 2017-03-21 07:26:59 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.


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