PDA

Bekijk de volledige versie : Spin down external HD



Styno
07-04-2004, 11:25
As many external HD's connected to the router will probably do nothing most of the time it would be nice to be able to spin-down the HD in these periods.

Because the HD is recognised as a SCSI drive, it would be interesting to include the 'SCSI idle' package (http://packages.debian.org/unstable/admin/scsi-idle) to either the firmware or as an external package.

As of yet I don't have any experience in creating customized firmware using Linux, so I'm asking someone else (I'm not mentioning anyone perticular ;-) ) to do the hard work. I will volunteer to do the nessesary testing :D

Oleg
07-04-2004, 12:56
I think the better way for this is using the power management settings of your drive, say there is a "power booster" the IBM drives. So you can configure it once and it will do all the jobs.

Antiloop
07-04-2004, 13:37
Originally posted by Oleg
I think the better way for this is using the power management settings of your drive, say there is a "power booster" the IBM drives. So you can configure it once and it will do all the jobs.

never heard of ?

can this util be used for other drives too? (e.g. Maxtor)
or is it intended for 2,5inch IBM drives?

Styno
07-04-2004, 14:04
According to the Hitachi homepage, the Power Booster software is intended to be used on the 'travelstar' mobile harddrives only. So, I guess it doesn't support regular 3.5" harddrives.

While Power Booster isn't likely to work with regualer HD's, the suggestion by Oleg made good sense, so I looked a bit further:
The 'Feature tool' (http://www.hitachigst.com/hdd/support/download.htm), also from Hitachi, has been reported to work with HD's from other vendors as well. This software provides options to change the APM (Advance Power Management) settings of your HD. I will try to determine if the software works with my Samsung 160Gb HD when I get home from work.

Oleg
07-04-2004, 14:08
Yes, I've used this with my laptop drive.
"Feature tool" works with deskstar models also.

Styno
07-04-2004, 20:07
By now I've tested my HD with the Hitachi Feature Tool and the result is not good:
Feature Tool is unable to change any APM settings on my Samsung V80 160Gb HD. This prevents the HD to spin down when idle for long periods (Changing acoustic settings works fine).

This brings back my question about the SCSI-idle package: Is/would it be possible to implement this package?

WlanMan
06-08-2004, 17:35
Hmmm, i havenīt tried it yet on my USB HD, but usualy i modify IDE HD Settings with HDparm (http://www.die.net/doc/linux/man/man8/hdparm.8.html) which can set many drive values, including APM. It should be in some form integrated in busybox.

From the man page:
"Set the standby (spindown) timeout for the drive. This value is used by the drive to determine how long to wait (with no disk activity) before turning off the spindle motor to save power."

Styno
06-08-2004, 18:29
Please note: The IDE HD is coupled with the WL-500g using USB. This will make the drive a SCSI drive for the OS running on the WL-500g. I really don't think HDParam is going to work. But hey, what isn't possible has never been done before right?

kwr
14-08-2004, 12:37
The hitachi-tool works. But must be run with the HD on an IDE-bus under MSDOS. All settings are saved in the HD.
My hitachi (IBM) 40G drive has the problem, that it spins down immidiatly or never. No value in between seems possible. But its a problem of Hitachi.
An older 20G seems to work correctly.

Styno
14-08-2004, 14:02
Right, I'm going to try to verify this with my Samsun 160Gb drive. I'll report later ....

kwr
14-08-2004, 18:30
@ styno,

if Hitachi-tools don't like your samsung 160GB then try some other tools.
I think in other threads there tools described, which are not only for one manufacturer. But it realy depends on your drive if it supports these ATA-commands.
Better take another drive then. But if somebody knows how to do it with Linux, I'd like it too.

Styno
15-08-2004, 12:29
Better take another drive then. But if somebody knows how to do it with Linux, I'd like it too.
Hehe, just throw this drive out of the window right? Have you won the jackpot to be able to afford a new drive just like that? :eek:

chase
16-08-2004, 09:22
never heard of ?

can this util be used for other drives too? (e.g. Maxtor)
or is it intended for 2,5inch IBM drives?

To Antiloop,

I notice you have a 160GB HDD attach to your wl500g with 1.7.5.6CR5.
Do you have HDD spin down problem? If no, which HDD you have?
Than I will go to get the same one...

Antiloop
16-08-2004, 09:52
To Antiloop,

I notice you have a 160GB HDD attached to your wl500g with 1.7.5.6CR5.
Do you have HDD spin down problem? If no, which HDD you have?
Than I will go to get the same one...

correct, i've hooked up the Maxtor 6Y160P0 it's a 160gb IDE model with 8mb of cache.

i don't know what you exactly mean with spin down problem, e.g. mine doesn't need to spin down because it's so quiet: I can't barely hear it at all (and yes I HATE noise of harddrives)

dAF2000
08-01-2005, 22:10
Hmmm, i havenīt tried it yet on my USB HD, but usualy i modify IDE HD Settings with HDparm (http://www.die.net/doc/linux/man/man8/hdparm.8.html) which can set many drive values, including APM. It should be in some form integrated in busybox.

From the man page:
"Set the standby (spindown) timeout for the drive. This value is used by the drive to determine how long to wait (with no disk activity) before turning off the spindle motor to save power."
I just compiled hdparm and it doesn't support standby for my USB drive :(
Some other functions however work, like a reading speed test and information about the drive. Some output:

[admin@daf2000 harddisk]$ ./hdparm -S0 /dev/discs/disc0/disc

/dev/discs/disc0/disc:
setting standby to 0 (off)
HDIO_DRIVE_CMD(setidle1) failed: Invalid argument

[admin@daf2000 harddisk]$ ./hdparm -tT /dev/discs/disc0/disc

/dev/discs/disc0/disc:
Timing cached reads: 108 MB in 2.03 seconds = 53.20 MB/sec
Timing buffered disk reads: 4 MB in 4.62 seconds = 886.58 kB/sec

Just because the other functions of hdparm seem to work, I will post it here. It's tested on a WL500g, release 1.9.2.7-2. But I will also try to compile other programs until I got that harddisk quite.

Note that this is my first program for the WL500g, so don't trust it :)

hugo
08-01-2005, 23:09
Thanks for this, but HDparm is already downloadable twice on this forum :D

hugo
08-01-2005, 23:51
As requested in PM

gilsas
14-02-2005, 23:50
I've tried to achieve HDD spin-down as well, with my Maxtor 120Gb HDD. I've of course attached it to the IDE cable of py PC, hdparm recognizes it, I can set the spindown time (hdparm -S) but the HDD behaviour does not seem to be affected ... still no spindown occuring, either attached to the PC or inside the HDD case, attached to the WL500g... :confused: :confused:
What a pity ... I was so happy to stream all my media from the router to my xbox ... yes movie playback is perfectly smooth, even considering the USB1.1 bandwidth... fast forward is as fast as from local HDD (don't ask me why, I'm only an impressed guy, thx Oleg)
but unfortunately I can't afford having the HDD running forever (noisy)

Anyone heard of an alternative to that ?

Styno
15-02-2005, 09:38
<knip>
Anyone heard of an alternative to that ?
You can try a 5400 RPM drive from Samsung they are silent, cool and cheap and pretty robust (They are a large OEM supplier).

Starting and stopping HDD's is bad for its MBTF, so its not a bad idea to let it spin 24/7..

gilsas
15-02-2005, 21:06
Yep, but unfortunately Samsung drives are for some reason almost impossible to find here in France ... even in Paris. :(
And anyways I don't feel like throwing my 120Gb maxtor drive to the garbage because it's (a little bit) noisy :p
I'll keep looking and otherwise consider your solution ! :D It's nevertheless disturbing that maxtor does not provide a tool capable of changing their HDD parameter ... go figure ... :confused:

Styno
16-02-2005, 10:43
It's nevertheless disturbing that maxtor does not provide a tool capable of changing their HDD parameter ... go figure ... :confused:You also might try to use a tool from another supplier, like the 'Hitachi feature tool'. There's a good chance it works on your maxtor drive as well.

http://www.hitachigst.com/hdd/support/download.htm

gilsas
18-02-2005, 08:45
You also might try to use a tool from another supplier, like the 'Hitachi feature tool'. There's a good chance it works on your maxtor drive as well.

http://www.hitachigst.com/hdd/support/download.htm

I've already tried that tool, but it does not support Maxtor drives (well, it does but not the APM settings change).
I've nevertheless progressed a little bit: in fact, setting the spindown time (hdparm -S xx /dev/hdc) is not enough, that has to be done along with setting the APM to a value at 127 or below. Any other value will prevent the HDD to spindown. I've tried, it works.
The issue: the parameters are not kept over power off.... the only option that I've found is -k and -K (keep parameters over reset), and the parameters are kept, but over reset only ... after power cycling the PC the parameters are gone ... :( :( :(

I'm lookin' for the fix right now !

dAF2000
18-02-2005, 13:02
I tried the same on a PC running Linux. The power of the harddisk was connected to the USB enclosure and the IDE cable to the computer. Entered some hdparm settings including the "keep settings". Harddisk spun down, so that worked. After that, removed the IDE cable from the harddisk while computer was still powered :eek: and connected it to the USB enclosure again.

Too bad it didn't work. Either the "keep settings" did not work or it was due to I shut down Linux before I swapped the cables.

For now, I see no solution how to spindown an USB harddisk. The problem is in the SCSI emulation driver, so we need a new driver or some other low level tooling.

gilsas
19-02-2005, 01:39
I tried the same on a PC running Linux. The power of the harddisk was connected to the USB enclosure and the IDE cable to the computer. Entered some hdparm settings including the "keep settings". Harddisk spun down, so that worked. After that, removed the IDE cable from the harddisk while computer was still powered :eek: and connected it to the USB enclosure again.

Too bad it didn't work. Either the "keep settings" did not work or it was due to I shut down Linux before I swapped the cables.




or it was due to I shut down Linux before I swapped the cables.


not, it's not ... I'm using a knoppix CD, and I've brutally stopped the computer so it let no chance to the OS to modify any HDD setting ... still the same result

I guess that in your case you've temporarily cut the HDD power supply (IDE -> USB case), which is equivalent to power cyce the system since the APM features are handled by the HDD itself... be careful I doubt it's recommended to hot unplug the IDE cable !

I still haven't taken a closer look at that problem ... I keep on looking for a fix . The problem here is *apparently* that hdparm is designed to re-set the HDD parameters upon each linux bootup (through the hdparm.conf file), an not to permanently set the parameters ... :(

Styno
05-03-2005, 15:46
For Maxtor drives there is an Acoustic Management utility (Don't you love Google?!): http://maxtor.custhelp.com/cgi-bin/maxtor.cfg/php/enduser/olh_adp.php?p_faqid=1200
Changes made by this utility are stored on the drive and remain active even after poweroff.

Below is a copy/paste from the NLSU2-linux site:

21. How do I spin down my USB hard disks?

You can download the Power Booster utility at http://www.hitachigst.com/downloads/pbinstall.exe for 2.5" IBM/Hitachi TravelStar disks. The Power Booster utility will enable the auto spin down feature of the disk. For 3.5" IBM/Hitachi drives (and maybe others), you can download the Feature Tool at http://www.hitachigst.com/downloads/featuretool_v195.exe. Otherwise temporarily install the IDE disk in your ordinary Linux box, read the disk technical documentation and use hdparm to adjust the settings by hand. The trick is to enable APM within the drive itself, so Linux doesn't have to care about it at all. You can't use hdparm to alter the APM settings from the NSLU2 as the USB->IDE adapters are emulated as SCSI host adapters in the Linux kernel which is incompatible with the necessary hdparm options.

Either way, you'll have to open your 2.5" USB enclosure and install the disk drive temporarily to a desktop computer using a 2.5" to 3.5" IDE adapter. After that, you can do the APM adjustment in Windows or Linux.

For Maxtor OneTouch drives see the Maxtor OneTouch HOWTO.

gilsas
15-03-2005, 19:02
For Maxtor drives there is an Acoustic Management utility (Don't you love Google?!): http://maxtor.custhelp.com/cgi-bin/maxtor.cfg/php/enduser/olh_adp.php?p_faqid=1200
Changes made by this utility are stored on the drive and remain active even after poweroff.

Below is a copy/paste from the NLSU2-linux site:


Mmmhh ... I did all of that, with the HDD being directly connected to the PC through the IDE cable, let me summarize:

- hdparm does not allow to make any permanent change to APM (and other) settings. I can set any parameter, but they remain active as long as the HDD is powered. After power cycling, the parameters are gone... I found no option beside -K (keep parameters over reset). :(

- The maxtor utility can set the HDD to either quite or fast, I did it, but no spin-down occuring, and no way to set it. :(

- The Power Booster utility recognizes my Maxtor HDD, I can set some parameters, but none related to APM. The tool reports something like 'not handled' or so. :(

That's really a pity that Maxtor does not provide a tool able to finely tune the APM parameters. And beside hparm, there's AFAIK no generic tool for changing that permanently.... Anyone heard about an alternative to that ?

Styno
15-03-2005, 20:06
Accoustic management is the only option for Maxtor HDD's, no APM settings are possibles AFAIK.

gilsas
15-03-2005, 22:14
Well, it depends on what you mean by that.
As being compliant to the APM standard specs, Maxtor drives have support for all APM related operations, including spin-down. Their latest USB HDD drives are provided with a small app. capable of setting explicitely the spin-down time. I don't think they're adding any additional hardware for supporting that beside the USB<->IDE chip. hdparm is also able to set the corresponding parameters, but unfortunately cannot commit definitively the changes.

So I guess that Maxtor drives do support APM features, but no tool exists for controlling them :( :( :( :(

I tried to contact Maxtor France hotline (website FAQ is useless in this regard) but so far I could only get the mailbox.

eludias
29-05-2005, 14:37
Just to add a link to more information about powering down IDE devices in SCSI enclosures:

sdparm is a command line utility designed to get and set SCSI disk parameters (cf hdparm for ATA disks):
http://lkml.org/lkml/2005/5/24/313

sg_start - starts (spins-up) or stops (spins down) SCSI devices:
http://www.die.net/doc/linux/man/man8/sg_start.8.html

My 6Gb second-hand 2.5" IDE drive in USB enclosure auto-spins-down, but I cannot change this at will. Anyone got sg_start (of sdparm) working for this purpose?

wireless
05-06-2005, 23:04
In windows you can allow the OS to power down usb devices (or to be more exact: tell them to enter a sleep level) to save energy. Since this functionality is non-os specific but is determined by the usb hardware, would it perhaps be possible to force a usb device (suche as an external hdd) to enter a sleep mode?
This way we eliminate the need to communicate with the hdd's themself (although I do foresee some new problems)...