Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16848 - hdparm init script should skip ataraid discs
Summary: hdparm init script should skip ataraid discs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-04 14:08 UTC by Arno
Modified: 2004-08-01 07:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/init.d/hdparm -- ATARAID changes. (hdparm,2.12 KB, text/plain)
2003-03-10 02:42 UTC, Justin Jones
Details
hdparm rc-script -- grep ide (changes proposed by drobbins) (hdparm,1.74 KB, text/plain)
2003-03-30 21:41 UTC, Justin Jones
Details
hdparm rc-script v2 -- changes proposed by drobbins (hdparm,1.87 KB, text/plain)
2003-04-08 01:46 UTC, Justin Jones
Details
hdparm rc-script v3.. more changes asked for by drobbins :> (hdparm,2.21 KB, text/plain)
2003-04-11 08:44 UTC, Justin Jones
Details
v4.. Sorry, v3 had a small error =\ (hdparm,2.19 KB, text/plain)
2003-04-11 23:20 UTC, Justin Jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arno 2003-03-04 14:08:32 UTC
hdparm 5.3-r2
The /etc/init.d/hdparm should skip ataraid discs, as these are RAID arrays.
I.E. on my machine, hdparm init scripts tries to apply settings on these discs:
ls -l /dev/discs/
total 0
...  disc0 -> ../ide/host2/bus0/target0/lun0
...  disc1 -> ../ide/host2/bus1/target0/lun0
...  disc2 -> ../ataraid/disc0
hdparm init script fails on disc2.
I guess it could be easy to add a grep for ataraid in the function checkconfig().

Thanks,
-- Arno.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Seth Chandler 2003-03-07 11:49:06 UTC
nagash you wanna pick this one up and run with it?
Comment 2 Justin Jones 2003-03-09 19:22:56 UTC
Yeh sure. Sorry for my tardiness. I kept asking you on IRC. :>
Comment 3 Justin Jones 2003-03-10 02:42:46 UTC
Created attachment 9193 [details]
/etc/init.d/hdparm -- ATARAID changes.

Works fine, maybe some aesthetic issues seth, I'll leave that for you to
decide.
(It says "Skipping cdrom1..." if $all_args is specified OR $cdrom1_args is
specified.)

I thought it might be a good idea to let the user know that hdparm isn't being
run on that drive, otherwise people might assume it is (when using $all_args)
Comment 4 Daniel Robbins (RETIRED) gentoo-dev 2003-03-27 13:15:02 UTC
OK, this is in 5.3-r2
Comment 5 Daniel Robbins (RETIRED) gentoo-dev 2003-03-27 13:17:09 UTC
oops. OK, why doesn't the hdparm script just scan for "ide" in the /dev/discs/ directory rather than scanning for "scsi" and *not* handling those?
Comment 6 Justin Jones 2003-03-30 03:29:52 UTC
No reason I guess, besides I just didnt think of it :)
Comment 7 Justin Jones 2003-03-30 03:31:47 UTC
I'll change it and upload tomorrow.
Comment 8 Justin Jones 2003-03-30 21:41:00 UTC
Created attachment 10051 [details]
hdparm rc-script -- grep ide (changes proposed by drobbins)

All done, works fine on my machine.
Comment 9 Justin Jones 2003-04-08 01:46:15 UTC
Created attachment 10362 [details]
hdparm rc-script v2 -- changes proposed by drobbins

Another version, this one uses an ewarn to inform the user that hdparm will not
be a run on a device (when it is found not to be an IDE device)

Eg.
v1 Output..
 * Starting hdparm...
 * Running hdparm on disc0...					[ ok ]
 * Running hdparm on disc1...					[ ok ]

v2 Output..
 * Starting hdparm...
 * Skipping cdrom0, hdparm only supports IDE devices!
 * Running hdparm on disc0...					[ ok ]
 * Running hdparm on disc1...					[ ok ]


No other changes from v1.
Comment 10 Justin Jones 2003-04-11 08:44:05 UTC
Created attachment 10500 [details]
hdparm rc-script v3.. more changes asked for by drobbins :>

IMHO this one looks like an ugly hack :>

I'm not a bash genius, so I'm sure theres many easier ways to do it, but ah
well, here it is.
Comment 11 Justin Jones 2003-04-11 23:20:57 UTC
Created attachment 10534 [details]
v4.. Sorry, v3 had a small error =\
Comment 12 Heinrich Wendel (RETIRED) gentoo-dev 2004-04-06 04:42:49 UTC
can you take a look at bug 37755 if that fixes your problem
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2004-08-01 07:43:13 UTC
fixed with bug #37755