Re: Standard location for hotplug-time hdparm invocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, 27 Feb 2011, Kenneth Porter wrote:

> To: CentOS mailing list <centos@xxxxxxxxxx>
> From: Kenneth Porter <shiva@xxxxxxxxxxxxxxx>
> Subject:  Standard location for hotplug-time hdparm invocation
> 
> I need to disable the spin-down on an external USB drive 
> because it spins down spontaneously while in use. The 
> drive forgets the spindown-disable state across power 
> outage so I need to reissue the hdparm command with each 
> boot or hotplug. Where should I put the hdparm command to 
> do this?

Not sure about hotpluging, but for the reboot 
/etc/rc.d/rc.local might be a good place to try this:

#!/bin/sh
#
# This script will be executed *after* all the other init 
# scripts. You can put your own initialization stuff in here 
# if you don't want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

# turn off DMA for hde WD drive
# -d0 = off
# -d1 = on
# hdparm -d0 /dev/hde

# set sector count for multiple sector I/O
# WD drives like a low setting
# to prevent I/O data errors.
# hdparm -m2 /dev/hde

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux