Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6131 - hdparm startup script
Summary: hdparm startup script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-07 00:24 UTC by Alastair Tse (RETIRED)
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments
/etc/init.d/hdparm (hdparm,1.52 KB, text/plain)
2002-08-07 00:25 UTC, Alastair Tse (RETIRED)
Details
/etc/hdparm.conf (hdparm.conf,1.29 KB, text/plain)
2002-08-07 00:26 UTC, Alastair Tse (RETIRED)
Details
/etc/init.d/hdparm (hdparm,753 bytes, text/plain)
2002-08-07 16:10 UTC, Martin Schlemmer (RETIRED)
Details
/etc/conf.d/hdparm (hdparm,217 bytes, text/plain)
2002-08-07 16:11 UTC, Martin Schlemmer (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair Tse (RETIRED) gentoo-dev 2002-08-07 00:24:02 UTC
Hi,

I was experiencing slow disk access, and found that even though I had hdparm
installed, I still needed to manually adjust the settings for the IDE harddisks
so that they work in DMA and EIDE modes. 

So I took a look at how RedHat was doing it and whipped up a rc script to
initalise the IDE parameters using hdparm. They're attached here. I wonder if it
would be a good idea to include these in to the hdparm ebuild. 

Comments appreciated :)

Cheers,

Alastair
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2002-08-07 00:25:12 UTC
Created attachment 2886 [details]
/etc/init.d/hdparm

checks for /etc/hdparm.conf, and runs the same command on available IDE drives
from hda to hdh.
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2002-08-07 00:26:44 UTC
Created attachment 2887 [details]
/etc/hdparm.conf

could possibly make the defaults less ambitious, and possibly even cater for
different settings for individual drives.
Comment 3 SpanKY gentoo-dev 2002-08-07 00:43:31 UTC
suggestion: change it from /etc/hdparm.conf to /etc/conf.d/hdparm

this is because it is custom for /etc/init.d/ scripts that have config files to 
place them in /etc/conf.d/ with very similar names to the script
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-08-07 16:10:51 UTC
Created attachment 2904 [details]
/etc/init.d/hdparm

What about this one .. lot simpler to configure (just set HDSETTINGS in
/etc/conf.d/hdparm).
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-08-07 16:11:43 UTC
Created attachment 2905 [details]
/etc/conf.d/hdparm
Comment 6 SpanKY gentoo-dev 2002-08-07 17:13:42 UTC
i like it, looks good/works well for me
nice job
Comment 7 Alastair Tse (RETIRED) gentoo-dev 2002-08-07 22:50:16 UTC
I think Martin's is pretty nice and simple. But I thought that making the conf
file a little more verbose and with explaination of each option is a little more
helpful when configuring hdparm settings.

Nevertheless, I conceed that my script was just a quick hack to get something
working :)

On a side note, after fiddling about with hdparm, I found that directly
modifying kernel parameters via procfs being much easier, eg:

echo "using_dma:1" > /proc/ide/hdc/settings

or 

echo "io_32bit:1" > /proc/ide/hdc/settings

Worth a thought :)