Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

USB HDD spin down
Thank you for your donation

Pages (2): 1 2 Next »
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
USB HDD spin down
8th Jan, 2013, 02:44 AM
Post: #1
julius02 Offline
Registered
Posts: 25
Joined: Jan 2013
Reputation: 0
USB HDD spin down
Is there a certain period when the usb hard drive will spin down after a certain period as default?
if not, can this be added as a custom feature?
thanks
Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 06:47 AM
Post: #2
Koenkk Offline
Registered
Posts: 1,238
Joined: Dec 2012
Reputation: 112
RE: USB HDD spin down
Good idea, will investigate.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 08:17 AM
Post: #3
rikardo1979 Offline
Management
******
Posts: 3,545
Joined: Dec 2012
Reputation: 190
RE: USB HDD spin down
i think to achieve this under linux, there is some script needed

~~~~>>>Please always follow rules and read before you post<<<~~~~
Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 08:25 AM
Post: #4
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: USB HDD spin down
Can you try:

Code:
sudo hdparm -S 60 /dev/sdX

A bit of information about the -S argument:

Terminal


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 timeout 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.

So, 60 counts for 5 minutes. Replace the X in /dev/sdX with the actual usb drive. Please note that not all external drives accept SMART settings through USB.

Also note, that Western Digital drives already have a quit aggressive headparking. So, in case of WD drivers, be carefull with those IDLE values.

To make these settings survive a reboot add them to /etc/rc.local just before 'exit 0'.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 06:20 PM
Post: #5
Koenkk Offline
Registered
Posts: 1,238
Joined: Dec 2012
Reputation: 112
RE: USB HDD spin down
It's better to add this to /etc/hdparm.conf, then it will always survive a reboot without having it in /etc/rc.local.

https://github.com/xbianonpi/xbian/issues/212

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
8th Jan, 2013, 08:23 PM
Post: #6
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: USB HDD spin down
I though it would be good to first test it like this...

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
13th Jan, 2013, 07:34 PM
Post: #7
namtih Offline
Tester
Posts: 269
Joined: Dec 2012
Reputation: 28
RE: USB HDD spin down
I saw the commit on github.
Please make this setting optional and if possible with free chooseable values (5,10,15,20,25,30,...) via xbian-config.

For example I use a external WD drive, which already has such builtin standby features.
Find all posts by this user
Quote this message in a reply
13th Jan, 2013, 07:47 PM
Post: #8
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: USB HDD spin down
@Namith, which you should disable in case of WD drives, 'cause it will break the HDD way to fast.

Also, specific feature requests can be posted on our git, because that's the only place where i look for newly to built features, and how we keep track of issues/milestones.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
26th Jan, 2013, 02:47 AM
Post: #9
namtih Offline
Tester
Posts: 269
Joined: Dec 2012
Reputation: 28
RE: USB HDD spin down
Didn't tried it yet, but sounds promising. So perhaps something to keep in mind:
http://forum.stmlabs.com/showthread.php?tid=2154&pid=50112#pid50112
Find all posts by this user
Quote this message in a reply
13th Mar, 2013, 03:15 PM
Post: #10
trader007 Offline
Registered
Posts: 4
Joined: Mar 2013
Reputation: 1
RE: USB HDD spin down
i was worried about this too. been reading about people trying to run scripts and everything.

but, before i went that route, i figured i would just test it first to see what it does.

i use these- http://www.ebay.com/itm/USB-to-SATA-Serial-ATA-Bridge-Adapter-Converter-Cable-/370528041862?pt=US_Drive_Cables_dapters&hash=item5645313b86

and on my 2.5" sata spindle drives, they spin down after about 2 minutes of inactivity Smile no configuration at all, just works out of the box on alpha 5. even if you just pause the music, the hdd still spins down. very, very effective so far. plus, it seems to buffer well because when i click play again, it resumes very fast. you really cant tell the hdd was sleeping.
Find all posts by this user
Quote this message in a reply
15th Apr, 2013, 01:07 PM
Post: #11
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: USB HDD spin down
there is standard package handling this under linux / debian like distributions.

apt-get install pm-utils

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
15th Apr, 2013, 10:38 PM
Post: #12
zilexa Offline
Registered
Posts: 231
Joined: Feb 2013
Reputation: 9
RE: USB HDD spin down
@trader007 what brand and type of harddrive do you have?

I got a weird message. Samsung 500GB 3.5" in an AC Ryan esata/usb case.
Later this wk I'll try udisk glue or if I can get it to work hd-idle.

Code:
xbian@xbian ~ $ sudo hdparm -S 60 /dev/sda

/dev/sda:
setting standby to 60 (5 minutes)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

edit: actually I always get this error. Even if I just check the state:
Code:
xbian@xbian ~ $ sudo hdparm -C /dev/sda

/dev/sda:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drive state is:  standby
Find all posts by this user
Quote this message in a reply
18th Apr, 2013, 08:02 PM
Post: #13
zilexa Offline
Registered
Posts: 231
Joined: Feb 2013
Reputation: 9
RE: USB HDD spin down
I read the PM-UTILS wiki and its not the solution. Its for suspending/hibernating your system, not simply spinning down the harddisk. Actually PM-UTILS simply uses the same HDPARM command to do this:
https://wiki.archlinux.org/index.php/Pm-utils (scroll all the way down to Tips and Tricks)

I will try udisk glue now. edit: cant figure that out. Installed hd-idle (easy) and its set. But Im not home so I cant check if the hdd actually spins down..
Find all posts by this user
Quote this message in a reply
20th Apr, 2013, 12:27 PM
Post: #14
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
USB HDD spin down
you can check status of spinning with hdparm.

pm-utils will do what you configures it for. if just hdd, then just hdd.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
23rd Apr, 2013, 01:48 AM
Post: #15
zilexa Offline
Registered
Posts: 231
Joined: Feb 2013
Reputation: 9
RE: USB HDD spin down
I checked and unfortunately it did not spin down using hdparm, also tried hd-idle. Not sure what the "bad/missing sense data..." means but its not working for my harddisks:
- Samsung 500GB in a AC Ryan usb/esata case
- Western Digita Green WD15EARS 1.5TB in a AC Ryan usb/esata case
- Adata CH11 750GB usb3 external harddrive

none of them spin down and the first two give the error mentioned above.
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 10th May, 2025, 07:44 AM Powered By MyBB, © 2002-2025 MyBB Group.