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.

Is there any way how to determine whether some drive is sleeping without occasionally waking it up? I have tried hdparm -C and smartctl -i but both of them actually wake it up when its already sleeping.

I need to set up a script that regularly checks the drive states and sets them asleep at certain times in case they are not sleeping already. (In fact that calling hdparm -Y on a sleeping drive actually wakes it up!).

share|improve this question
    
I imagine that, since you're polling the drive's firmware, it needs to wake up to activate that. –  user3914 May 31 '11 at 5:07

2 Answers 2

up vote 3 down vote accepted

Try using standby (hadparm -y) mode instead of sleep (hdparm -Y). In this mode issuing hdparm -C or smartctl --nocheck standby -i won't wake up drive.

share|improve this answer
    
What's the exact difference between standby mode and sleep mode? In terms of power consumption. –  NumberFour Jun 2 '11 at 14:57
    
I don't know but I suspect that difference is minimal because in both modes drive is spun down. –  AlexD Jun 2 '11 at 15:56

In ubunto calling smartctl with -n POWER_MODE, where POWER_MODE={sleep,standby,idle} wakes up the drive and spins it up. I'm actually calling: smartctl -a -i -dsat,12 -n POWER_MODE /dev/sde I want to find a way to continuously poll my external drives (via USB) but without waking them up if they are asleep. Is the -a option what is overwritng the -n option? Is it the USB housing/controller? Testing this takes forever because I have to wait for the drives to sleep.

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.