Bug 101772 - "sfdisk -s" doesn't report on cciss (and cpqarray?) devs
Summary: "sfdisk -s" doesn't report on cciss (and cpqarray?) devs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: util-linux
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-06 17:33 UTC by Eric Hagberg
Modified: 2007-11-30 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-20 19:04:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eric Hagberg 2003-08-06 17:33:42 UTC
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
17776560

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):
util-linux-2.11y-22

How reproducible:
Always

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 20:34:16 UTC
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 20:58:54 UTC
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 18:46:33 UTC
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 11:27:09 UTC
Waiting on feedback from bug reporter

Comment 5 Eric Hagberg 2003-09-17 22:34:36 UTC
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 19:04:40 UTC
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 15:31:44 UTC
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.