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!).

link|improve this question

I imagine that, since you're polling the drive's firmware, it needs to wake up to activate that. – Randolph West May 31 '11 at 5:07
feedback

2 Answers

up vote 2 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.

link|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
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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