0

How to send to sleep a hard drive completely after it's being unmounted?

I'm planning to have separate 4TB drive only for backups. It will be encrypted and I will only mount it when I need to perform big backups. After unmounting it again, I would like to send it to sleep, i.e. physically to make it stop spinning.

Is there a way to do it in CentOS Linux 6.3?

Any help would be appreciated.

Ilia Ross
  • 1,166

1 Answers1

2

You can do that by sending the drive a command via hdparm. Either by sending it a direct command to go to sleep (-y or -Y), or by setting the timeout for the drive to do this on its own.

The relevant commands for that are:

  • hdparm -S180 /dev/hdc (Enter standby mode on its own after a multiple of 5 seconds. Valid values are [1..240]
  • -y Immediately enter low power consumption standby mode, usually causing it to spin down.
  • -Y Immediately enter the lowest power consumption sleep mode, causing it to shut down completely. A hard reset or soft reset is required before the drive can be accessed again.
Hennes
  • 4,852