![在 Linux 中手动暂停 3ware raid](https://linux22.com/image/1427450/%E5%9C%A8%20Linux%20%E4%B8%AD%E6%89%8B%E5%8A%A8%E6%9A%82%E5%81%9C%203ware%20raid.png)
我在 Fedora 中运行 3ware 9650SE RAID。我希望能够手动挂起和唤醒(关闭和打开)RAID。系统不驻留在 RAID 上。我该怎么做?我认为这是可能的,因为当整个系统进入挂起状态时,挂起和唤醒工作正常。PS:已启用 ACPI。
我已经尝试过的:
3ware CLI tw_cli 似乎没有提供暂停命令,根据: http://www.cyberciti.biz/files/tw_cli.8.html
echo -n "auto" > /sys/devices/.../power/control 无效
echo -n 0 > /sys/devices/.../power/autosuspend_delay_ms 返回 IO 错误,这意味着它不受支持,根据: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-power
根据以下内容解除驱动程序与设备的绑定: 我如何告诉 Windows 或 Linux 将特定 (PCI[e]) 设备置于睡眠/关闭 (D3) 状态? 使用:echo -n "0000:02:00.0" > /sys/bus/pci/drivers/3w-9xxx/unbind “拔下” RAID,但不会暂停它
echo -n "1" > /sys/devices/.../remove 没有达到预期的效果
我还没有尝试手动将 PCI 电源状态从 D0 切换到 D3设定pci因为我不知道该怎么做。
串行通信返回以下设备信息:
02:00.0 RAID bus controller: 3ware Inc 9650SE SATA-II RAID PCIe (rev 01)
Subsystem: 3ware Inc 9650SE SATA-II RAID PCIe
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at e4000000 (64-bit, prefetchable) [size=32M]
Region 2: Memory at e7000000 (64-bit, non-prefetchable) [size=4K]
Region 4: I/O ports at a000 [size=256]
[virtual] Expansion ROM at e6000000 [disabled] [size=128K]
Capabilities: [40] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v1) Legacy Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <128ns, L1 <2us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x8, ASPM L0s L1, Exit Latency L0s <512ns, L1 <64us
ClockPM- Surprise- LLActRep+ BwNot-
LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk- DLActive+ BWMgmt- ABWMgmt-
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
Kernel driver in use: 3w-9xxx
我将感激您的帮助。
答案1
我刚刚自己找到了一个解决方案:对于所有驱动器......
sudo smartctl -d 3ware,0 -s standby,now /dev/twa0
唯一重要的是确保 RAID 未被访问。否则驱动器将自动恢复在线状态。
参考: http://smartmontools.sourceforge.net/man/smartctl.8.html