Bug 154892

Summary: /etc/rc.sysinit only loads driver for first scsi controler
Product: Red Hat Enterprise Linux 4 Reporter: Aleksandar Milivojevic <alex>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-14 19:14:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
check for all scsi_hostadapter lines none

Description Aleksandar Milivojevic 2005-04-14 18:33:33 UTC
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:
There is a bug in /etc/rc.sysinit script.  The regular expression in awk statement will catch only first SCSI controler in the system (as returned by modprobe -c).  The fix is trivial, and I'll include the patch as attachment.  Usually this is not a big issue since device drivers for all SCSI controlers (regardless if they are needed to mount root file system or not) will be loaded from initrd image anyhow earlier in the boot process.  Anyhow, might be worth fixing regardless of that.

BTW, I've also made a bug report for mkinitrd (bug 154857), suggesting it should load sg driver too if there are SCSI devices in the system.  Alternative would be if sg is loaded from rc.sysinit from "initialize hardware / storage" section (would be trivial to implement).

Version-Release number of selected component (if applicable):
initscripts-7.93.11.EL-1.centos4

How reproducible:
Always

Steps to Reproduce:
1. On system with > 1 SCSI contoler execute:

/sbin/modprobe -c | \
awk '/^alias[[:space:]]+scsi_hostadapter[[:space:]]/ { print $3 }'

It'll only return first controler.

Additional info:

Comment 1 Aleksandar Milivojevic 2005-04-14 18:35:51 UTC
Created attachment 113176 [details]
check for all scsi_hostadapter lines

Comment 2 Bill Nottingham 2005-04-14 19:14:34 UTC
This is fixed in 7.93.12.EL-1.


*** This bug has been marked as a duplicate of 145432 ***

Comment 3 Aleksandar Milivojevic 2005-04-14 20:51:12 UTC
Ah, I searched only under RHEL tree...  Anyhow, what is your opinion about
loading sg device driver from rc.sysinit script if SCSI host adapters are
detected (the additional question from the end of bug report)?

Comment 4 Bill Nottingham 2005-04-14 21:01:51 UTC
sg should be loaded by the hotplug system (see /etc/hotplug/scsi.agent) when
necessary.

Comment 5 Aleksandar Milivojevic 2005-04-14 21:07:38 UTC
Hm, well, it isn't...  And looking at scsi.agent it seems as it should.  I'll
look around a bit.  Should I report a bug against hotplug system?

Comment 6 Bill Nottingham 2005-04-14 21:14:16 UTC
What device type? Also, make sure you don't have the version of scsi.agent with
the typo (MODULE vs. MOUDLE, or something like that...)

Comment 7 Aleksandar Milivojevic 2005-04-15 01:14:38 UTC
Yup, it is the one with a typo in the line for SCSI type 8 (changer).  Which is
my device (changer in tape library).  I guess when I fix the typo, module will
be automatically loaded on boot.  And looking at it more closely, I see possible
typo in line that initializes TYPE_ATTR (unless DEVPATH is guaranteed to start
with "/").

Comment 8 Bill Nottingham 2005-04-15 02:52:49 UTC
The hotplug typo is fixed in 2004_04_01-7.5. That and the initscripts fix should
both be in U1.

I believe DEVPATH is always propagated by the kernel starting with '/'/