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

1
  • I imagine that, since you're polling the drive's firmware, it needs to wake up to activate that.
    – user3914
    May 31, 2011 at 5:07

1 Answer 1

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.

3
  • 1
    What's the exact difference between standby mode and sleep mode? In terms of power consumption.
    – NumberFour
    Jun 2, 2011 at 14:57
  • 1
    I don't know but I suspect that difference is minimal because in both modes drive is spun down.
    – AlexD
    Jun 2, 2011 at 15:56
  • 3. Standby – The device is capable of responding to commands but the device may take longer (up to 30 seconds) to complete commands than in the Idle mode. Power consumption is reduced from that of Idle mode. If a hard drive is present, it is spun down. 4. Sleep – This is the lowest power mode. The device interface is typically inactive and, if a hard drive is present, the drive is spun down. The device will exit the Sleep mode only after receiving a reset. Wake up time can be as long as 30 seconds. Quote from SATA Power Management: It’s Good to Be Green
    – Eric M.
    Sep 4, 2023 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .