hdparm poweron_standby 有多危险?

Bry*_*tin 7 hdparm

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.
Run Code Online (Sandbox Code Playgroud)

-s 是 conf 中的 poweron_standby

   -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.
Run Code Online (Sandbox Code Playgroud)

是什么让这如此危险?对我来说,看起来您在下次启动之前无法旋转它。这对我来说不是问题。我只是想在使用 Linux 时关闭我的 Windows 驱动器。

Pro*_*kup 6

由于“待机时开机”设置可以存储在驱动器中,并且在重新启动和电源循环后仍然有效。该设置确实告诉驱动器不要开始旋转,而是等到收到正确的命令才能启动。因此,在打开电源后,磁盘消耗的功率要少得多。

危险在于,当您的 BIOS 和操作系统都不会向驱动器发送正确的启动命令时,您的驱动器将不会被检测到。现在您无法运行hdparm以禁用“待机时开机”功能,因为设备/dev/sdX丢失。

简而言之,有些情况下无法轻松撤消启用“待机时开机”。

使用 mpt2sas linux 驱动程序 P15.x 的 LSI SAS2008 控制器就是这样一种情况(2013 年 1 月),在设置 PUIS 后,驱动器将不再可用于操作系统。有关详细信息,查看https://unix.stackexchange.com/questions/58922/how-to-fix-mpt2sas-port-enable-failed-with-timeout-timeout-300s