Author Topic: /etc/rc.d and hdparm  (Read 1246 times)

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
/etc/rc.d and hdparm
« 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!

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
/etc/rc.d and hdparm
« Reply #1 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
Contains scenes of mild peril.

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
/etc/rc.d and hdparm
« Reply #2 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.

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
/etc/rc.d and hdparm
« Reply #3 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.
Contains scenes of mild peril.

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
/etc/rc.d and hdparm
« Reply #4 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 ]

Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

KernelPanic

  • VIP
  • Member
  • ***
  • Posts: 1,878
  • Kudos: 222
/etc/rc.d and hdparm
« Reply #5 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.
Contains scenes of mild peril.

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
/etc/rc.d and hdparm
« Reply #6 on: 22 December 2002, 03:55 »
OH man, you saved my ass. Thanks!

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
/etc/rc.d and hdparm
« Reply #7 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 ]

Someone please remove this account. Thanks...

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
/etc/rc.d and hdparm
« Reply #8 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.