8
jacks@Gen4:~$ sudo hdparm -s 1 -S 4 /dev/sdb

/dev/sdb:
Use of -s1 is VERY DANGEROUS.
This requires BIOS and kernel support to recognize/boot the drive.
Please supply the --yes-i-know-what-i-am-doing flag if you really want this.
Program aborted.

-s is poweron_standby in the conf

   -s     Enable/disable the power-on in standby feature, if supported by the  drive.   VERY  DANGEROUS.
          Do  not  use unless you are absolutely certain that both the system BIOS (or firmware) and the
          operating system kernel (Linux >= 2.6.22) support probing for drives that  use  this  feature.
          When  enabled, the drive is powered-up in the standby mode to allow the controller to sequence
          the spin-up of devices, reducing the instantaneous current draw burden when many drives  share
          a power supply.  Primarily for use in large RAID setups.  This feature is usually disabled and
          the drive is powered-up in the active mode (see -C above).  Note that a drive may  also  allow
          enabling  this  feature  by a jumper.  Some SATA drives support the control of this feature by
          pin 11 of the SATA power connector. In these cases, this command may  be  unsupported  or  may
          have no effect.

What makes this so dangerous? To me it looks like you just wont be able to spin it up until next boot. Which isn't a problem for me. I am just looking to shut off my windows drive while I am in Linux.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
Bryan Austin
  • 97
  • 1
  • 9

2 Answers2

8

As the "power-on in standby" setting can be stored in the drive and survives reboots and power cycles. The setting does tell the drive to not start spinning, but wait until the correct command is received to do a spinup. As a result the disk consumes considerably less power after power is turned on.

The danger lies in the fact that when neither your BIOS nor your OS will sent the correct spin-up command to the drive, that your drive will not be detected. Now you can't run hdparm to disable the "power-on in standby" feature, because the device /dev/sdX is missing.

In short there are cases where enabling "power-on in standby" can't be undone with ease.

The LSI SAS2008 controller using mpt2sas linux driver P15.x is such a case (january 2013) where after setting PUIS the drive will no longer be available to the operating system. For details have a look at https://unix.stackexchange.com/questions/58922/how-to-fix-mpt2sas-port-enable-failed-with-timeout-timeout-300s

Pro Backup
  • 914
  • 4
  • 15
  • 33
0

It would be similar to having a hard drive failure at a predictable interval. Basically, you're giving the drive the permission to power-down when it feels like it. It will generate no indications to the underlaying OS that it has powered-down... it's up to the bios to be smart enough to keep track of the hard drive state, and spin it up when you try & read/write from/to it. If the bios or disk controller doesn't... linux will say commit changes to disk... and the hard drive will give no response back. Very big chance for data loss and/or corruption.

TheCompWiz
  • 7,349
  • 16
  • 23
  • So if I never mount it. If I never write to it. Is there any danger? – Bryan Austin Apr 13 '11 at 18:13
  • If you never mount it, and never write to it, why try & set the parameter? Keep in mind, hdparam affects the drive directly. If you boot into windows after-the-fact or a different OS... the setting will persist. – TheCompWiz Apr 13 '11 at 18:20