Pages

Wednesday, September 19, 2012

Disable / Bring HDD into Sleep State in Linux


When booting Linux from external device you may want to disable internal hard disk drive, you can disable your hard drive without removing your hard drive from your laptop/desktop PC.

Disable / Hot unplug SATA Drive
echo 1 > /sys/block/sda/device/delete

Enable / Scan SATA Devices
echo "- - -" > /sys/class/scsi_host/host0/scan
 PS: The hard disk drive may automatically power down when you disable it.


If you want to put your hard drive into standby / sleep state to save power, and it can automatically weak up when the system try to access it. You may try to use hdparm.

Put HDD into standby state
hdparm -y /dev/sda

Put HDD into sleep state
hdparm -Y /dev/sda

ATTENTION: When using hdparm command to put drive into standby/sleep state, the SATA drive may weak up if your system try to access this drive.

No comments:

Post a Comment