Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a home-fileserver with 6 desktop harddisks in a md-raid.

The server isn't accessed a lot, so I think it would be good for the harddrives to go in standby-mode after some idle time (e.g. with the hdparm -S or hd-idle command).

Is this safe when using mdadm or could this cause errors/degraded harddisks?

share|improve this question
    
As a quick answer, I believe that if something is supposed to write/read the drive, it will come out of standby. –  soandos Aug 26 '11 at 21:35
    
I take it you're not using a desktop environment on this computer? It'd be really safe if gnome or kde did it for you. –  digitxp Aug 26 '11 at 21:36
    
@soandos: Yes that's the behaviour I would expect too. –  Dani31 Aug 26 '11 at 21:43
    
@digitxp: You're right, but why do you think it would be really safe with a desktop environment? –  Dani31 Aug 26 '11 at 21:44
1  
@Dani31 You know the Gnome guys, they'll make something absolutely idiotproof or if they can't they'll pretend such a feature never existed. –  digitxp Aug 26 '11 at 21:47

2 Answers 2

up vote 3 down vote accepted

I should think so. I have been using it my backup machine with RAID-1 for about a year. Got the tips from this page. It is also mentioned on the Gentoo wiki and [H]ardforum threads.

Also, the man page for hdparm marks the similar power off mode (-s ) as VERY DANGEROUS but makes no mention about risks in the hd-idle section.

share|improve this answer

As stated in the hdparm man page for -S:

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 Red Hat Power Management guide states:

Many applications scan configuration files for changes. In many cases, the scan is performed at a fixed interval, for example, every minute. This can be a problem, because it forces a disk to wake up from spindowns.

Both of these strongly indicate that spinning down disks is safe, as if any disk activity occurs that requires a particular disk to be spun up, it will be spun up automatically. This also agrees with my personal experience; any disk I/O will make a spun-down drive spin up. You can also manually cause I/O to the drive to force it to spin up if you know it'll soon be needed; hdparm's -z option might be useful for that:

-z Force a kernel re-read of the partition table of the specified device(s).

Note that as stated in the hdparm man page, the spin-up process can take considerable time during which the I/O request will appear nonresponsive to the userland process. I suggest trying this beforehand to make sure your disks don't take excessive time to spin up, which might make mdraid kick them out of your array (which leads to Bad Things when you drop below your array's redundancy threshold). Spinup times shouldn't be a problem with modern drives, but you never know for certain before you test in your particular environment.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.