Red Hat Bugzilla – Bug 154857
should mkinitrd add sg module if SCSI controllers are defined in modprobe.conf?
Last modified: 2007-11-30 17:11:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Firefox/1.0.2 Red Hat/1.0.2-1.4.1.centos4
Description of problem:
Not sure if this is bug or feature reqest...
Anyhow, should mkinitrd load sg (SCSI generic driver) if system contains any SCSI devices (for example, scsi-hostadapter* lines are detected in modprobe.conf)? Currently, the only way to get SCSI devices that don't have specialized drivers automatically accessible after boot time seems to be either placing "modprobe sg" in /etc/rc.local or building initrd image by hand using --with=sg option.
Udev doesn't seem to be able to handle this. It's kind of chicken and egg problem. If there are no /dev/sg* nodes, applications can't trigger loading of sg device driver. If sg driver is not loaded, udev doesn't create /dev/sg* nodes. With old (pre-udev, such as Red Hat 7.3) systems this wasn't problem, since monolitic/static /dev contained sg* nodes (and therefore applications were able to trigger loading of sg driver by simply accessing one of sg* nodes).
This affects only some classes of SCSI devices. For example, disks and tape drives are usually not affected, since they are usually accessed through specialized device drivers (st, sd_mod) and corresponding nodes in /dev. Devices with no specialized drivers, such as changers in tape libraries for example, do not get any specialized devices automatically created. So using /dev/sg* is the only way of accessing them.
An alternative approach to the problem would be if patch from bug 135836 is merged into the source tree. That way users that have a need for /dev/sg* nodes would be able to specify it in configuration file. That way, when kernel is upgraded, correct initrd image would be generated. Somehow, I'd preffer having sg loaded always by default (if there are SCSI controllers in the system), but would be perfectly happy with specifying it in configuration file as proposed in bug 135836.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use mkinitrd on machine with some SCSI hardware
One more alternative would be if "sg" is loaded from /etc/rc.sysinit (part of
initscripts package) when SCSI controlers are detected in the system.
The hotplug module is supposed to load sg driver as needed, and it wa not loaded
because of bug in it (I had buggy version of hotplug package from RHEL4). The
bug in hotplug has been fixed and should be part of U1. Marking this is dupe.
*** This bug has been marked as a duplicate of 151534 ***