Bug 466181 - F10b1 fails to see drives attached to a CCISS adapter
Summary: F10b1 fails to see drives attached to a CCISS adapter
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
medium
urgent
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Target
TreeView+ depends on / blocked
 
Reported: 2008-10-08 21:44 UTC by Paul Moore
Modified: 2008-10-15 21:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-15 21:31:33 UTC
Type: ---
Embargoed:


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

Description Paul Moore 2008-10-08 21:44:23 UTC
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 21:59:41 UTC
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 18:06:03 UTC
Created attachment 319889 [details]
Output from lshal

Comment 3 Paul Moore 2008-10-09 18:06:32 UTC
Created attachment 319890 [details]
Output from dmesg

Comment 4 Paul Moore 2008-10-09 18:07:44 UTC
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 18:18:54 UTC
Disks aren't showing up in hal, therefore anaconda won't know they exist

Comment 6 Doug Chapman 2008-10-09 19:25:33 UTC
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 19:38:02 UTC
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 23:05:55 UTC
I have narrowed this down to a specific git commit upstream:

commit 6ae5ce8e8d4de666f31286808d2285aa6a50fa40
Author: Mike Miller <mike.miller>
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 15:09:24 UTC
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 19:43:06 UTC
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 20:38:15 UTC
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 14:02:33 UTC
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 18:51:27 UTC
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 21:31:33 UTC
Fixed in 2.6.27-15


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