Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a RAID setup using mdadm with 4 harddrives. The server should not always run the harddrives, so I searched for a solution to put HDDs in standby and found this:

hdparm -S 240 /dev/sda

which should put drive /dev/sda in standby and sets auto-spindown-timer to 20 minutes, so the next time it will be idle for more than 20 minutes it will be spin down again. The output of the command also states this:

/dev/sdb:
 setting standby to 240 (20 minutes)

But in fact, the drive spins down after about 5 seconds after the last access, and

hdparm -C /dev/sdb

displays:

/dev/sdb:
 drive state is:  standby

It is impossible to access the RAID, since it is a RAID5 and data is spread among devices, so reading a file results in waking up one drive, then the second drive, but after 5 seconds the first drive was idle, it spins down again and so on...

Sometimes, if I execute hdparm -C to check the current status of the drive, it spins up, which is definitely not what I want, since I wanted to write a monitor script checking the status every minute or so.

Since mdadm is running and the RAID is mounted, it may be the case that mdadm is accessing the disks too often, so this may be the problem but I don't really think so.

Another question is: Is it possible to check a drive's temperature when it is in standby? Using hddtemp gives me SLP which obviously stands for standby, so using hdparm wouldn't be a solution to check for temperature in standby mode. But it may be an alternative solution for checking the status of the drive?

So there are actually three problems:

  • Drive spins down too fast using hdparm -S ...
  • Drive spins up when checking its status using hdparm -C
  • Checking temperature of drive in standby mode isn't possible using hddtemp

Do you know what I'm doing wrong?

share|improve this question

closed as off topic by Zoredache, voretaq7 May 15 '12 at 21:13

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Spinning hard drives up and down is bad for them. You might save a tiny amount of power, but you could cost yourself a large amount of money replacing it early. –  Basil May 15 '12 at 13:11
    
That's the reason why I don't want them to spin up and down too often. I use the RAID only as a network device for multimedia data and backups, so the drives should be in stand by most of the time. I expect the drives to spin up about 1 to 2 times a day in average. The timeout of 2 minutes is for testing purposes and will be increased to about 1 hour. –  leemes May 15 '12 at 13:23
1  
+1. I've been waiting years for someone to phrase this question well. –  tomfanning May 15 '12 at 14:44
    
@tomfanning Me too, so now I did finally ;) –  leemes May 15 '12 at 14:45
2  
Spinning up twice a day is worse than letting them spin unused. –  Basil May 15 '12 at 14:59
show 9 more comments

1 Answer

You're asking the wrong question. Spinning a disk up and down daily is bad for it and reduces the mean time between failure. The gain of a small amount of electric efficiency, in a datacenter, is too small to overcome the loss of the disk.

share|improve this answer
1  
Citation needed Do you have any evidence of this? –  Zoredache May 15 '12 at 16:25
    
It's common knowledge: temperature changes are bad for hardware, and drives are designed and rated for continuous use. –  Basil May 15 '12 at 16:52
    
I asked a simple question and I have my needs to power them down, believe me. I'm not a datacenter, and if I would care that much about HDD health, I would welcome your advice. But in this case, please stop that. I want an answer for my question, not an advice not to do so. Thanks. –  leemes May 15 '12 at 19:22
1  
@leemes - what's "wrong" with them is that they're not paid to do this for you. While it might be frustrating to feel you're not getting straight answers to questions, if you want to 'demand' answers from people and tell them to "please stop that" then you'll be wanting a paid support option. –  RobM May 15 '12 at 21:05
1  
@leemes Unfortunately many people have preconceived notions about what answer they're expecting. When they don't get the expected answer hostility is a common response. It's entirely appropriate to give an Answer which doesn't actually answer the Question if the Question has a false assumption. The general consensus of professional disk administrators is not to do something that your question presumes; hence "don't do that" is a valid response. See Loaded Question for more details. –  Chris S May 15 '12 at 21:28
show 1 more comment

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