Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On bootup all disks are spun up, but 4 are just backup (and pretty noisy too). Soo I'd rather prefer to never ever spin them up at all when booting.

Is there a kernel option which tells the kernel which SATA port the disk is attached which contains the rootfs?

How can I achieve disks not spinning up on boot?

share|improve this question
Did you figured out, how to non-destructively test, if the HDD & Motherboard support the hddparm -s command? – Adam Ryczkowski Feb 12 '14 at 9:50
I did not have much time yet nor enough disk space to backup everything properly. So this is postponed to early march. For the meantime I did set the disk spin down time to something close to a 1 minute - but this is just a temporary fix. – drahnr Feb 17 '14 at 20:51
up vote 3 down vote accepted

I am not sure how the first sentence relates the last one. Maybe you could enhance your question. So assuming the first sentence is the actual question, I may point you in the right direction.

What you are looking for is called Power-up in Standby or PUIS for short. This feature has to be supported by your BIOS/UEFI, hard drive and the kernel. Some hard drives, for example certain models from Western Digital, are equipped with a special jumper to enable this feature. (Western Digital calls this feature PM2). On other drives this feature can be enables by using hdparm. The command below should only be run when you are absolutely sure your platform supports PUIS. This command could potentially make a disk undetectable by even your BIOS! I recommend you to read the man page for more information.

CAUTION hdparm -s 1 /dev/sdX CAUTION (Note the -s option is lower case.)

I did not implement this feature yet on my own server. Currently I am just examining all pros and cons. I have read somewhere that you have to remove the drive from /etc/fstab as well. Else the mount command will spin up the drive. However I can not confirm this yet.

share|improve this answer
As for the last part, it should be enough to just mark the entry noauto. – Michael Kjörling Oct 11 '13 at 7:47
My motherboard is ASUS Z87-PLUS (how to find out? EFI is really spars, and the website from ASUS is useless ), Linux kernel should support it right (as long my root does live on another hard disk) , hard drives (WD20EARX-00PASB0, SAMSUNG HD103SJ) at least the first should support it (according to hdparm -l /dev/sdf). Are you sure the EFI has to support it? – drahnr Oct 13 '13 at 11:29

Also assuming that the title and the first half of the question is your actual question, there's more magic to be done through hdparm. If you can live with the disks spinning up and then shutting down, you can use hdparm to instruct the disk to spin down after a short period of inactivity. This is done through its -S (upper case S) parameter.

Setting a spindown timeout means the disk still spins up normally during the power-on, but then spins down at some reasonably determinate time thereafter. This is usually safer than setting the disk to power up in standby.

Note that, as stated in the man page:

The encoding of the timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values.

Hence, if you want to spin down the disk /dev/sdb and sets its idle spindown time to one minute, you'd use:

sudo hdparm -S12 /dev/sdb

You could add such hdparm commands to a late boot script like /etc/init.d/rc.local, or your distribution may offer a specific init script configuration file to do it. For example, on Debian, you'd edit /etc/hdparm.conf to include:

/dev/sdb {
    spindown_time = 12

I would suggest using an appropriate name from one of the /dev/disk/by-* directories (/dev/disk/by-id might be easiest to read as the names there include both the disk model number and serial number) rather than the /dev/sdX name, particularly in a boot script or configuration file referenced from a boot script such as hdparm.conf. (Any disk changes could cause those names to change, but the /dev/disk/by-* names will remain the same.)

In order to prevent the file systems from being mounted, add the noauto option to the relevant /etc/fstab entries. You will still be able to mount the file systems normally by manually running sudo mount /some/mount/point and not mounting the file systems unless/until they are needed will usually reduce the probability of unexpected disk activity (which would cause those noisy disks to spin up, then spin down again after reaching the spindown timeout).

share|improve this answer
Thanks for answer - but I'd prefer to prevent them spinning up instead of spinning them down on boot again. – drahnr Oct 11 '13 at 8:37
@drahnr Assuming your system supports disk power-up in standby, that indeed is a better match for what you are asking. This approach, however, is safe in the case when the system does not support that feature. – Michael Kjörling Oct 11 '13 at 8:59
I hope it does, I am already using a solution similar to yours for now, have yet to find out if my Mainboard does support it. – drahnr Oct 11 '13 at 9:39

You must log in to answer this question.

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