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

Re: disable sleep mode hdd usb



Greg Madden wrote:
On Tuesday 17 August 2010 09:16:51 Markus wrote:
Camaleón wrote:
On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:
I want disable the sleep mode in my external hdd usb forever when start
Debian.
hdparm/sdparm may help.

But some manufacturers disallow this management on the user side.

Greetings,
Put this line:

hdparm -B 255 /dev/sdX

in your /etc/rc.local file where X is the corresponding letter for your
usb hdd.
For getting this to work, your usb hdd has to be pluged in the usb-port
during boot up.
And you have to ensure that it always has the same "X".

Does hdparm understand uuid's ? The original poster doesn't mention the verson of Debian, Squeeze uses uuid's, and if you are using external usb devices, uuid's are a great way to make sure the same file system gets mounted appropriately each time.

Yes hdparm works with uuid's. Here is an example from my ubuntu system.
I suppose it's the same for a Debian system ;-)

sudo blkid

gives my a summary of the pluged hdd's:

/dev/sda1: UUID="2C6CA0626CA02912" TYPE="ntfs"
/dev/sda2: UUID="D6EC99F0EC99CB5F" LABEL="PageFile" TYPE="ntfs"
/dev/sda3: UUID="7fd6681a-b5af-4972-8fb7-827bd9ab45a6" TYPE="ext3"
/dev/sda5: UUID="3d77d85b-9d39-4f02-852b-1eb5669e6fda" TYPE="ext3"
/dev/sda6: UUID="6cdb6b0e-14c7-4014-8588-a16228152909" TYPE="swap"
/dev/sdb1: UUID="f331af38-d8b0-473d-92b1-9ada96e1dfb9" TYPE="ext3"

Let's say /dev/sdb is my usb-hdd. Then the hdparm command would look like this:

sudo hdparm -B 255 -S 243 /dev/disk/by-uuid/f331af38-d8b0-473d-92b1-9ada96e1dfb9

As the result you should get something like:

/dev/disk/by-uuid/f331af38-d8b0-473d-92b1-9ada96e1dfb9:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Invalid exchange
 setting standby to 243 (1 hours + 30 minutes)
 APM_level      = off

By the way....You dont need the "-S" parameter. It's just for setting the standby time.


Reply to: