LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-16-2010, 01:53 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question Stop HDD spinning after some time - where to configure


If I use Gnome, is "gnome-power-preferences" the only place where I can configure the system to stop or not to stop spinning HDD as a power saving tool? Is there any other option outside GUI?
 
Old 12-16-2010, 02:11 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You might want to look at the man page for hdparm.

Code:
NAME
       hdparm - get/set SATA/IDE device parameters

SYNOPSIS
       hdparm [ flags ] [device] ..

DESCRIPTION
       hdparm  provides  a  command  line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver subsystem.  Many newer (2008 and later) USB drive enclosures now also
       support "SAT" (SCSI-ATA Command Translation) and therefore may also work with hdparm.  Eg. recent WD "Passport" models and recent NexStar-3 enclosures.  Some options may work correctly only with the latest kernels.

OPTIONS
 . . .
       -S     Put the drive into idle (low-power) mode, and also set the standby (spindown) timeout for the drive.  This timeout 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.  Under such circumstances, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most drives are much quicker.  The encoding of the timeout value is
              somewhat peculiar.  A value of zero means "timeouts are disabled": the device will not automatically enter standby mode.  Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from  5  seconds  to  20
              minutes.   Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours.  A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined time‐
              out period between 8 and 12 hours, and the value 254 is reserved.  255 is interpreted as 21 minutes plus 15 seconds.  Note that some older drives may have very different interpretations of these values.
Having said that, I have never used hdparm. It would be a good idea for you to read the whole man page and all options to decide if this is what you need.
 
1 members found this post helpful.
Old 12-16-2010, 02:20 PM   #3
djtoltz
Member
 
Registered: Nov 2003
Location: Eastern North Carolina, USA
Distribution: Mandrake
Posts: 51

Rep: Reputation: 20
There is an article on-line that describes some of the issues with power saving on a Linux machine. Unfortunately, you can't just tell your HD to go to sleep after 10 minutes and expect that to work if you've got daemons touching the disk all the time. Check this: http://www.spencerstirling.com/compu...wersaving.html for details.
 
Old 12-16-2010, 02:28 PM   #4
silvyus_06
Member
 
Registered: Oct 2010
Distribution: Ubuntu 10.04 , Linux Mint Debian Edition , Microsoft Windows 7
Posts: 390

Rep: Reputation: 50
maybe try

Quote:
sudo udisks --set-spindown-all
to spin it down if it don't work to make it sleep

I NEVER USED THAT
I DON'T ASSUME ANY RESPONSABILITY .
 
Old 12-16-2010, 02:46 PM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Thanks guys! I need to be sure that my HDD doesn't stop spinning after some idle time. I don't need that. So if I don't have hdparm installed and "gnome-power-preferences" is configured - does it mean HDD won't stop spinning after any idle time? And thanks for link, I'll check it out.
 
Old 12-16-2010, 02:52 PM   #6
djtoltz
Member
 
Registered: Nov 2003
Location: Eastern North Carolina, USA
Distribution: Mandrake
Posts: 51

Rep: Reputation: 20
You're in luck. It's definitely easier to turn off the spin-down than it is get the system to stop writing log files and such to the HD and waking it up. How you go about doing this will depend on the type of drive. Hopefully that link I posted will point you in the right direction. Once you figure out which file or tool is appropriate for your system, check the man or info pages of that tool/file and you should find your answer.
 
Old 12-16-2010, 03:35 PM   #7
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Thanks. How do I watch amount of start-stop spinnig of HDD with smartctl? What option is this if I do
smartctl -a /dev/sda
?
 
Old 12-16-2010, 04:10 PM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Quote:
Originally Posted by Mr. Alex View Post
Thanks. How do I watch amount of start-stop spinnig of HDD with smartctl? What option is this if I do
smartctl -a /dev/sda
?
Quote:
excerpt from 'man smartctl';

-a, --all
Prints all SMART information about the disk, or TapeAlert information
about the tape drive or changer. For ATA devices this is equivalent
to
´-H -i -c -A -l error -l selftest -l selective´
and for SCSI, this is equivalent to
´-H -i -A -l error -l selftest´.
Note that for ATA disks this does not enable the non-SMART options and
the SMART options which require support for 48-bit ATA commands.
'man command' is your friend.

Since you stated 'hdd' instead of including interface type for hdd as ide, eide, ata or sata would benefit all so as to provide specific related commands.

That way we may provide specifics. My bets are on ata or sata. I didn't include scsi storage since it's not a normal desktop user storage device.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
HDD stopped spinning tidiman07 Linux - Hardware 2 11-29-2007 08:23 PM
DVD Drive doesn't stop spinning Silver925 Linux - General 9 06-09-2005 12:10 PM
Hard disk spinning all the time. jwijesundra Linux - General 6 08-02-2004 03:32 AM
Hard drive doesnt stop spinning sooty Linux - General 3 11-14-2002 06:30 PM


All times are GMT -5. The time now is 04:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration