This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 466181 - F10b1 fails to see drives attached to a CCISS adapter
F10b1 fails to see drives attached to a CCISS adapter
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity urgent
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F10Target
  Show dependency treegraph
 
Reported: 2008-10-08 17:44 EDT by Paul Moore
Modified: 2008-10-15 17:31 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-15 17:31:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Output from lshal (80.36 KB, text/plain)
2008-10-09 14:06 EDT, Paul Moore
no flags Details
Output from dmesg (15.02 KB, text/plain)
2008-10-09 14:06 EDT, Paul Moore
no flags Details
prevent orphaned cciss disks (495 bytes, patch)
2008-10-13 16:38 EDT, Doug Chapman
no flags Details | Diff
Patch to fix orphaned disks and sysfs symlink (495 bytes, patch)
2008-10-14 14:51 EDT, Mike Miller (OS Dev)
no flags Details | Diff

  None (edit)
Description Paul Moore 2008-10-08 17:44:23 EDT
Description of problem:
When doing an install of Fedora 10 Beta 1 on a system with drives attached to a CCISS controller Anaconda fails to see the disks when prompting the user for partitioning information; without any disks the user is forced to abort the install.  I have been able to verify that the kernel sees the disks by switching to another virtual console and verifying the disks are present both through dmesg and entries in the /dev/cciss directory.

Version-Release number of selected component (if applicable):
Fedora 10 Beta 1 for the x86_64 architecture

How reproducible:
Everytime

Steps to Reproduce:
1. Install Fedora Beta 1 on a systems with disks attached to a CCISS controller
2. Cry at the futility of it all
  
Actual results:
No disks in Anaconda

Expected results:
Disks in Anaconda

Additional info:
None
Comment 1 Chris Lumens 2008-10-08 17:59:41 EDT
If you run lshal on tty1 once you're in the graphical environment, does it see the CCISS-attached devices?
Comment 2 Paul Moore 2008-10-09 14:06:03 EDT
Created attachment 319889 [details]
Output from lshal
Comment 3 Paul Moore 2008-10-09 14:06:32 EDT
Created attachment 319890 [details]
Output from dmesg
Comment 4 Paul Moore 2008-10-09 14:07:44 EDT
I have no idea how to make sense of the lshal output so I've attached the captured output, as well as the output from dmesg, and attached them to this bug.

Let me know if you need any more information.
Comment 5 Jeremy Katz 2008-10-09 14:18:54 EDT
Disks aren't showing up in hal, therefore anaconda won't know they exist
Comment 6 Doug Chapman 2008-10-09 15:25:33 EDT
This appears to be specific to recent kernels.  I took an F9 system and updated to the latest hal and it works OK.  However then when I updated the kernel hal then only showed the cciss controllers and not the disks on that controller.

Also does not appear to be fedora kernel specific.  I have a RHEL5.2 ia64 system with a kernel built directly from Linus's git tree and it shows the same behavior.

Not sure if this should be considered a kernel bug or not, it might be a valid change in behavior on the kernel side that needs to be reflected in hal?  Probably not but I want to rule that out before reassigning this to kernel.
Comment 7 Jeremy Katz 2008-10-09 15:38:02 EDT
cciss is notorious for moving things around in proc/sysfs and having to do adjustments to the probing code for it.  For a long time, we were having to update anaconda/kudzu just about every release for something changing.
Comment 8 Doug Chapman 2008-10-10 19:05:55 EDT
I have narrowed this down to a specific git commit upstream:

commit 6ae5ce8e8d4de666f31286808d2285aa6a50fa40
Author: Mike Miller <mike.miller@hp.com>
Date:   Mon Aug 4 11:54:52 2008 +0200

    cciss: remove redundant code
    


Adding Mike Miller to the CC list for his input.

Mike,

It appears we no longer register all the information in sysfs.  Some of the info that allows hal to find the disks isn't there in these recent kernels.  This has the affect of anaconda and mkinitrd not knowing about cciss so we cannot install to or boot from cciss under Fedora.

I will try to dig into this more deeply on monday.
Comment 9 Doug Chapman 2008-10-13 11:09:24 EDT
On the previous kernels (prior to the "remove redundant code" patch) we
saw info about the cciss disks in 2 locations

A generic block directory:

/sys/block/cciss!c0d0
which is a symlink to /sys/devices/virtual/block/cciss!c0d0

and in a directory specific to that cciss card's PCI address:
/sys/devices/pci0000:40/0000:40:13.0/0000:45:00.0/0000:46:08.0/block/cciss!c0d0


The latter (the pci one) is the one that hal uses.  That directory is missing
after the "remove redundant code" patch.

That path exists up to this point:
/sys/devices/pci0000:40/0000:40:13.0/0000:45:00.0/0000:46:08.0/

but it is missing the "block" directory.
Comment 10 Doug Chapman 2008-10-13 15:43:06 EDT
What appears to be happening here is we are creating disk kobjects that do not have the correct parent (parent is NULL).

The parent was previously set via:

cciss.c:3629 (in cciss_init_one)
                 disk->driverfs_dev = &pdev->dev;

which is then used later in register_disk to set the parent:

fs/partitions/check.c:417
         disk->dev.parent = disk->driverfs_dev;


So, it seems the proper place for this is in the new cciss_add_disk function, however that does not have access to the pdev which was passed in to cciss_init_one.

The parent ends up being NULL so in sysfs these disks show up as "virtual" disks and are not tied to the controller.

i.e. they get created in sysfs under:
/sys/devices/virtual/....

insead of where "real" devices should show up:
/sys/devices/pci..../..../
Comment 11 Doug Chapman 2008-10-13 16:38:15 EDT
Created attachment 320227 [details]
prevent orphaned cciss disks

Mike,

This fixes this issue.  Can I send this upstream with a signed-off-by from you?  I would like to get this upstream soon so we can be sure that cciss works for Fedora-10.
Comment 12 Mike Miller (OS Dev) 2008-10-14 10:02:33 EDT
Doug,
I just made this same patch yesterday and had it tested in Ft. Collins. I'll send my patch up today.

-- mikem
Comment 13 Mike Miller (OS Dev) 2008-10-14 14:51:27 EDT
Created attachment 320340 [details]
Patch to fix orphaned disks and sysfs symlink

Doug,
This is identical to your patch. I've submitted it upstream.
Comment 14 Chuck Ebbert 2008-10-15 17:31:33 EDT
Fixed in 2.6.27-15

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