Hdparm

hdparm poweron_standby 有多危險?

  • July 19, 2014
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 是 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.

是什麼讓這變得如此危險?對我來說,您似乎無法在下次啟動之前啟動它。這對我來說不是問題。我只是想在 Linux 中關閉我的 Windows 驅動器。

由於“待機時開機”設置可以儲存在驅動器中,並且可以在重新啟動和電源循環後繼續存在。該設置確實告訴驅動器不要開始旋轉,而是等到收到正確的命令後再進行旋轉。因此,磁碟在打開電源後消耗的電量要少得多。

危險在於,當您的 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

引用自:https://serverfault.com/questions/259255