Bug 126996 - sfdisk -s won't list the sizes of all disks
sfdisk -s won't list the sizes of all disks
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: util-linux (Show other bugs)
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-06-30 07:52 EDT by Jean Marc BOUCHER
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-10 10:41:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jean Marc BOUCHER 2004-06-30 07:52:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
sfdisk -s won't list the sizes of all disks

it's on IBM xSeries 235 with a ServeRaid scsi card (bios 7.00.14)

[root@celprod1 root]# sfdisk -s
/dev/sda: 143372288
/dev/sda1:    127984
/dev/sda2:   4192524
/dev/sda3:   1048131
/dev/sda4:         1
/dev/sda5:   1048099
/dev/sda6:   1048099
/dev/sda7:   2040223
/dev/sda8:    528034
/dev/sda9:    264001
/dev/sda10: 133072600

the same command run on a x335 with RH ES 2.1 return
[root@linux6 root]# sfdisk -s  
/dev/sda:  71555072
/dev/sdb:  37748736
/dev/sdc:  37748736
/dev/sdd:  10485760
/dev/sde:   3145728
total: 160684032 blocks

which is the good result according to man pages

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

How reproducible:

Steps to Reproduce:
1.sfdisk -s

Additional info:
Comment 1 Elliot Lee 2004-07-13 17:54:59 EDT
The behaviour has changed somewhat since RHEL 2.1AS. Under RHEL 3, I
would expect the  individual partitions to be listed, and no 'total'
line to be printed.

The curious thing is that 'sfdisk -s' on RHEL3 seems to have only
printed the /dev/sda* partitions instead of printing the
/dev/sd[bcde]* partitions as well - was that in fact the case, or did
you just truncate the output?
Comment 2 Jean Marc BOUCHER 2004-07-28 04:27:19 EDT
no output truncated !!!

the first output is on a server with one drive only (sda) and the
second is on another server with five drives (sda, sdb, sdc, sdd, sde)

if you read the man page of sfdisk it says:

   List Sizes
       sfdisk -s partition gives the size of partition in blocks. This
may be useful in connection with programs  like
       mkswap or so. Here partition is usually something like
/dev/hda1 or /dev/sdb12, but may also be an entire disk,
       like /dev/xda.
              % sfdisk -s /dev/hda9
       If the partition argument is omitted, sfdisk will list the
sizes of all disks, and the total:
              % sfdisk -s
              /dev/hda: 208896
              /dev/hdb: 1025136
              /dev/hdc: 1031063
              /dev/sda: 8877895
              /dev/sdb: 1758927
              total: 12901917 blocks

so why the behaviour of sfdisk -s as changed on RH ES 3 ?



just a comment:

we have bought a redhat enterprise server support and not a "fedora
one" ;-) .  
the delay are very long for a professionnal support answer !!! if you
want professionnal IT keep on using your enterprise solutions, you'd
better answer more quickly ...  
Comment 3 Elliot Lee 2004-12-10 10:41:23 EST
Hey, just noticed this old bug. Sorry for the very long delay.

bugzilla is not a support forum - please contact Red Hat support
through the standard channels.

The behaviour changed in RHEL3 to handle another more serious bug, but
the man pages weren't updated to match. In the development tree,
another fix is just going in that returns to the original behaviour
while dealing with the other bug.

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