silencing an idle HDD

An idle HDD can be unmounted and put to sleep, but (eg.) debian still wakes the disk from time to time.
to prevent that we can set the HDD state to offline.
this way, all attempts to access the disk will fail, and the disk stays asleep.

the disk state is specified by writing either “running” or “offline” to /sys/block/sdb/device/state


echo "offline" | sudo tee /sys/block/sdb/device/state
Posted in IT

Leave a Reply

Your email address will not be published.