Red Hat Bugzilla – Bug 103609
mkinitrd's (undocumented) --with-usb flag doesn't work anyway
Last modified: 2007-04-18 12:57:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703
Description of problem:
I was hoping I was going to be able to do some RAID1 of boot partitions and LVM
physical volumes with this external hard disk I just purchased, but it turns out
that the kernel brings up raid devices before the usb-storage module is loaded.
In fact, mkinitrd doesn't even add usb-storage.o to the initrd filesystem, even
though /boot is mounted from a RAID1 device that does have a member in the
external disk (does it matter?), and the root filesystem is in a volume group
whose physical volumes are all raid1 devices that have replicas in the external
Worse yet: if I force usb-storage to be copied to the initrd filesystem, then
the external hard disk is not recognized at all (e.g., fdisk /dev/sda fails).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.create raid1 device for /boot or /, with an external usb device as one of the
Actual Results: The slot that used to be taken by the usb raid1 member is
missing (i.e., the partition was not found when the raid1 device was brought up)
Expected Results: /me would like it to be :-)
You have to pass --with-usb to get mkinitrd to pull in usb modules. Otherwise,
things got horribly bad very fast (it caused a number of bugs in 8.0 which is
why it was changed back for 9 and later)
Err... --with-usb? mkinitrd doesn't seem to support such an option. I tried
--with=usb as well, but then it couldn't find a module named usb.o. And then,
as I wrote before, --with=usb-storage had ill effects. Can you please check the
spelling of the option you're telling me to use? Thanks,
Ok, so... There is a bug in /sbin/mkinitrd in that it matches --with* before
--with-usb, but you already have a fix for that. The other problem is that,
although I don't have root or boot in a USB device, I do have them used by the
root and boot devices, as a raid 1 member of the former, and as a raid1 member
of one of the physical volumes that form the volume group that contains the root
logical volume. But the code to tell whether --with-usb implies $needusb
doesn't check for raid members or volume groups :-(
Err... Actually, I didn't either /boot or / in RAID at all (I had the wrong
pair of /boot and / in mind. This doesn't make any difference, though, AFAICT.
Having it in a raid device or in a physical volume, it won't be detected.
The solution I ended up using was to explicitly add the following modules to the
mkinitrd line, in this order:
--with=usb-uhci --with=sd_mod --with=usb-storage
with Red Hat Linux 9's mkinitrd, some additional options were needed in between
(it seems to not automatically add dependencies):
--with=usbcore --with=usb-uhci --with=scsi_mod --with=sd_mod --with=usb-storage
Now it works but, heck!, USB 1.1 is slow! (as expected :-) I just got a
firewire cable that will plug into my laptop, so let's see how that works...
First try wasn't successful :-(
Oh, I forgot to mention: the Shrike mkinitrd doens't add the `sleep 5' after
loading usb-storage, so it doesn't quite work out of the box either.
On the good side, Shrike can access the disk as firewire, but Severn (with a
slightly newer kernel than what shipped in the beta) can't :-(
Committed the fix for --withusb.
Not going to fix raid on usb case, although if you want to patch things to
support it, feel free to send my way.