Bug 101772 - "sfdisk -s" doesn't report on cciss (and cpqarray?) devs
"sfdisk -s" doesn't report on cciss (and cpqarray?) devs
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: util-linux (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2003-08-06 13:33 EDT by Eric Hagberg
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-20 15:04:40 EDT
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 Eric Hagberg 2003-08-06 13:33:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030805

Description of problem:
Not sure if this is really an sfdisk or Compaq raid driver issue, but this
problem doesn't exist on AS 2.1 and does in the latest beta (and probably
previous ones).

[root@saias11 etc]# sfdisk -s
total: 0 blocks
[root@saias11 etc]# sfdisk -s /dev/cciss/c0d0

On a similar machine running AS 2.1:

saias10 / 954# sfdisk -s
/dev/cciss/c0d0:  17776560
total: 17776560 blocks

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

How reproducible:

Steps to Reproduce:
1. run rhel3 beta1 on a Compaq machine w/ raid card that uses cciss driver
2. "sfdisk -s"
3. you get "total: 0 blocks"

Expected Results:  should see /dev/cciss/* devices in "sfdisk -s" output.

Additional info:
Comment 1 Matt Wilson 2003-08-06 16:34:16 EDT
this is due to cciss/cpqarray using "c0d0" as the dev node name.  sfdisk skips
entries that end in a digit, because it thinks it is a partition.
Comment 2 Eric Hagberg 2003-08-06 16:58:54 EDT
If it is sfdisk skipping the entry for that reason, then it is a new bug in
sfdisk (not the HP/Compaq raid driver) and it would have the same broken
behavior on machines that use the cpqarray driver (it has names like
/dev/ida/c0d0, etc...)
Comment 3 Elliot Lee 2003-08-12 14:46:33 EDT
The only workaround I can put in will result in an incorrect count on the 'total:' line. 
/proc/partitions does not tell me whether a 'partition' is a whole disk, partition, RAID array, 
LVM group, etc. - implementing this this would need kernel changes. The 2.1AS 
implementation of sfdisk does really aweful things that shouldn't be forward-ported. Since 
'-s' works fine if you specify a block device, the consequences are fairly minor. The main 
problem is coming up with a solution that works with /proc/partitions (perhaps that is to just 
decide that the 'total:' line should be eliminated - is that acceptable?).
Comment 4 Elliot Lee 2003-09-11 07:27:09 EDT
Waiting on feedback from bug reporter
Comment 5 Eric Hagberg 2003-09-17 18:34:36 EDT
I guess that's acceptable... though I'd think there would be some way to work
around this that wasn't as much of a mess as the RH AS 2.1 version.
Comment 6 Elliot Lee 2004-08-20 15:04:40 EDT
The fix has been in the devel tree for a long while (pre RHEL3 IIRC) -
sorry for not noting that here.
Comment 7 Elliot Lee 2004-12-10 10:31:44 EST
FWIW, the latest util-linux going into the devel tree has a better fix
for this issue. The 'total' size count should be back for FC4 and beyond.

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