LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-29-2011, 05:53 AM   #1
<Ol>Origy
Member
 
Registered: Aug 2003
Location: Slovenia
Distribution: Arch, Debian, Embedded
Posts: 136

Rep: Reputation: 15
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
 
Old 05-29-2011, 09:49 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
1 members found this post helpful.
Old 05-29-2011, 02:10 PM   #3
<Ol>Origy
Member
 
Registered: Aug 2003
Location: Slovenia
Distribution: Arch, Debian, Embedded
Posts: 136

Original Poster
Rep: Reputation: 15
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?
 
Old 05-29-2011, 04:44 PM   #4
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic attempted to kill the idle task! in idle task - not syncing dudutworld Linux - Newbie 2 09-16-2013 01:50 PM
bash spinning cursor romainp Linux - General 3 09-22-2007 08:29 PM
Something spinning my HD? tormented_one Slackware 5 02-09-2005 03:34 PM
Installation Disks not recognized as official disks when booting with floppy coal-fire-ice Mandriva 13 12-09-2004 04:29 PM
why is my disk spinning up? mattl Linux - General 2 06-07-2004 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration