Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm getting a laptop tomorrow with an SSD as the primary (operating system) drive, and I will be putting my old laptop's HDD into it as a secondary drive for holding music etc.

Since HDDs use power when idle, just to keep themselves spinning, I was wondering what the optimum settings for 'spinning down' the drive might be, as well as any other tips. I remember seeing reference to a settings file where I would be able to choose how long the drive can sit idle for before spinning down, but I don't know where it was.

Additionally, if the drive uses an NTFS file system, will the system write or read anything from the drive by itself which could prevent the spin-down from happening? I was intending to permanently mount it using the installer to /windows, but would be open to any better methods if this would cause a problem.

Thanks for any assistance.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

To put your second HDD (I suppose /dev/sdb) to standby immediately, you can use

sudo hdparm -y /dev/sdb

To put it to standby after a minute of inactivity, you can use

sudo hdparm -S 12 /dev/sdc

(time is counted in 5s for 5s to 20min)

To make this setting permanent, you can write it in /etc/hdparm.conf:

sudo gedit /etc/hdparm.conf

and there:

[...]
/dev/sdb {
    spindown_time = 12
}
share|improve this answer
    
I am using sdparm --command=stop <device> to spin down the drive. Where would I need to configure that? –  Marco Sep 28 '12 at 16:47
    
Thankyou for this answer. Just out of interest, if I choose to simply mount/unmount the drive myself each time, will the drive be powered down whenever it's unmounted? If not, how can I 'turn it off' when I don't want it? –  Sman789 Sep 30 '12 at 0:56

You could also try to enabled Aggressive Link Power Management (ALPM). Aggressive Link Power Management (ALPM) is a mechanism where a SATA AHCI controller can put the SATA link that connects to the disk into a very low power mode during periods of zero I/O activity and into an active power state when work needs to be done. Tests show that this can save around 0.5-2 Watts of power on a typical system.

ALPM is now available in several SATA controllers that use the Advanced Host Controller Interface (AHCI). However, there is evidence that some controllers may go into a low power state incorrectly and this ends up causing data loss. Ubuntu has the ability to use ALPM but it it disabled by default since it can cause data loss on some machines. Since there is a chance that this can cause data loss do not enable it unless you have backups of your data and are willing to take the risk.

To enable ALPM:

echo SATA_ALPM_ENABLE=true | sudo tee /etc/pm/config.d/sata_alpm
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.