Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: TheQuirk on 22 December 2002, 02:21

Title: /etc/rc.d and hdparm
Post by: TheQuirk on 22 December 2002, 02:21
I set my compuper's hard drive thing optimized with the following command:

# hdparm -c3 -m16 -X34 -d1 -u1 /dev/hda

My question is will these settings be there when I reboot? If not, what do I do to make this command run every time I reboot? I know I need to stick it somewhere in /etc/rc.d/*, but that's about it. Help!
Title: /etc/rc.d and hdparm
Post by: KernelPanic on 22 December 2002, 02:35
quote:
Originally posted by TheQuirk:
I set my compuper's hard drive thing optimized with the following command:

# hdparm -c3 -m16 -X34 -d1 -u1 /dev/hda

My question is will these settings be there when I reboot? If not, what do I do to make this command run every time I reboot? I know I need to stick it somewhere in /etc/rc.d/*, but that's about it. Help!



Somewhere after your filesystem checks
Title: /etc/rc.d and hdparm
Post by: TheQuirk on 22 December 2002, 02:47
quote:
Originally posted by Tux:


Somewhere after your filesystem checks



Can you be a bit more specific? I know what you mean, but where would I stick it? I don't know anything about rc.d.... This is Red-Hat 7.2, BTW.
Title: /etc/rc.d and hdparm
Post by: KernelPanic on 22 December 2002, 03:05
At the end of /etc/rc.d/rc.sysinit put this:

# Optimise /dev/hda transfers
hdparm -c3 -m16 -X34 -d1 -u1 /dev/hda
echo "/dev/hda optimised!"

That should work, but I am no RedHat buff.
The init scripts are just bash scripts so they're not difficult to look through.
Title: /etc/rc.d and hdparm
Post by: Master of Reality on 22 December 2002, 03:13
just put that line in "/etc/rc.d/rc.local"
(void main's probably gonna tell me to shut the fuck up or somethin..)

[ December 21, 2002: Message edited by: The Master of Reality / B0b ]

Title: /etc/rc.d and hdparm
Post by: KernelPanic on 22 December 2002, 03:52
quote:
Originally posted by The Master of Reality / B0b:
just put that line in "/etc/rc.d/rc.local"
(void main's probably gonna tell me to shut the fuck up or somethin..)

[ December 21, 2002: Message edited by: The Master of Reality / B0b ]



shut the fuck up!

Oh wait, i'm Tux, nevermind.
Title: /etc/rc.d and hdparm
Post by: TheQuirk on 22 December 2002, 03:55
OH man, you saved my ass. Thanks!
Title: /etc/rc.d and hdparm
Post by: voidmain on 22 December 2002, 06:50
Actually /etc/rc.d/rc.local is the file I used to run it out of when I needed to. The last few versions of Red Hat have not needed any tweaking on my systems. However, there actually is a file for this in Red Hat called /etc/sysconfig/harddisks which is a template for a configuration file. For instance, copy that file along with the name of the hard drive you want to tune like so:

# cp /etc/sysconfig/harddisks /etc/sysconfig/harddiskhda

and modify the new file to your liking. It already looks for this file in the rc.sysinit.  At least RH 7.3 and 8.0 do, don't remember if 7.2 did. If you have a file called /etc/sysconfig/harddisks then it does.

[ December 21, 2002: Message edited by: void main ]

Title: /etc/rc.d and hdparm
Post by: TheQuirk on 22 December 2002, 07:17
quote:
Originally posted by void main:
Actually /etc/rc.d/rc.local is the file I used to run it out of when I needed to. The last few versions of Red Hat have not needed any tweaking on my systems. However, there actually is a file for this in Red Hat called /etc/sysconfig/harddisks which is a template for a configuration file. For instance, copy that file along with the name of the hard drive you want to tune like so:

# cp /etc/sysconfig/harddisks /etc/sysconfig/harddiskhda

and modify the new file to your liking. It already looks for this file in the rc.sysinit.  At least RH 7.3 and 8.0 do, don't remember if 7.2 did. If you have a file called /etc/sysconfig/harddisks then it does.

[ December 21, 2002: Message edited by: void main ]



It has it, in case anyone was wondering.