4

How to check whether disk is in sleep?

I am doing some reports in background and, if disk is already sleeping, I would like to avoid waking it up. Which command can I use to check its status without waking it up?

0

1 Answer 1

2

atacontrol spindown [drive] should show the drive's current state and the timer.

Also, when the drives are spun down it will appear in the messages log, the most recent of which can be displayed with dmesg.

A side note, a drive's life deteriorate every time they change power states; minimizing power state transitions will prolong life.

2
  • atacontrol is not available under FreeNAS :( Commented Apr 28, 2017 at 5:28
  • You can use /usr/local/sbin/smartctl -n standby /dev/<drive> and /usr/local/sbin/ataidle /dev/<drive> instead, camcontrol inquiry <drive> and camcontrol standby <drive> may also be useful. Commented Jul 7, 2019 at 4:55

You must log in to answer this question.

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