LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Spinning down idle disks (https://www.linuxquestions.org/questions/linux-hardware-18/spinning-down-idle-disks-883314/)

<Ol>Origy 05-29-2011 05:53 AM

Spinning down idle disks
 
Hello.

I am curious about a particular matter. Recently I have purchased a small plug computer that I will use as a torrent server and networked file storage. The thing is I will attach an external HDD to this linux box. Now I am curious about something. The HDD is powered on while the box works, but once the work is done the disk seems to keep running and does not spin down automatically - even though there is no I/O happening.

My question is whether I should add a script that automatically powers down the HDD after a while of inactivity to save electricity or is it better to keep the disk spinning? How does spinning down a HDD affect its health?

Regards

MS3FGX 05-29-2011 09:49 AM

Spinning down a drive will have no ill effects, and in fact some of the newer high-efficiency drive will actually spin themselves down after a period of inactivity rather than rely on software to tell them to do so.

The amount of energy you save will depend on a lot of factors. On my own system, the drive spinning takes around 10 watts, and when spun down only 2 watts. Admittedly, this isn't a huge power savings (about equal to a night-light), but there is no reason to burn the energy if you don't need to.

I've never tried to perform power management on an external drive before, but it seems that you will want to look into using the sdparm utility. This blog post seems to point in the right direction.

<Ol>Origy 05-29-2011 02:10 PM

I am fully aware how to spin down a disk using sdparm.
sdparm -C stop /dev/sg0 (yes, that's /dev/sg0, not /dev/sda)

While the newer disks may spin down on their own, mine does not. I will have to write a script that monitors the I/O of the HDD to power it off once it has been idle for a given time, add it to cron jobs. The reason I'm asking is because I don't want the disk to spindown and spinup too many times. I assume that doing so will degrade its health and lifespan.

What idle spindown interval do you suggest I set? 3 hours?

MS3FGX 05-29-2011 04:44 PM

My server is setup to sleep the storage drive after only a few minutes of inactivity; 3 hours seems like an unnecessarily long time for a home file server.


All times are GMT -5. The time now is 09:53 AM.