16

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

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
NumberFour
  • 419
  • 2
  • 8
  • 18
  • I imagine that, since you're polling the drive's firmware, it needs to wake up to activate that. –  May 31 '11 at 05:07

1 Answers1

16

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

AlexD
  • 8,747
  • 2
  • 29
  • 38