我有大约六台服务器,它们都在 Oneiric 服务器 AMD64 上运行 Intel RS2BL080 raid 控制器。使用 megaraid_sas 内核模块时运行正常,但当我尝试使用 megacli 探测卡时,它告诉我没有可用的 raid 控制器。
Intel 不支持 Ubuntu 操作系统,所以他们帮不了我。四处寻找后,我发现其他人也使用过这个 megaraid 控制器。
我只是想联系那些可能知道我做错什么的人。
$ megacli -adpCount
Controller Count: 0.
Exit Code: 0x00
$ megacli -v
MegaCLI SAS RAID Management Tool Ver 8.02.16 July 01, 2011
(c)Copyright 2011, LSI Corporation, All Rights Reserved.
Exit Code: 0x00
$ lspci -vv
09:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05)
Subsystem: Intel Corporation RAID Controller RS2BL080
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: I/O ports at 3000 [size=256]
Region 1: Memory at d8040000 (64-bit, non-prefetchable) [size=16K]
Region 3: Memory at d8000000 (64-bit, non-prefetchable) [size=256K]
[virtual] Expansion ROM at d8500000 [disabled] [size=256K]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [68] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 4096 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s, Latency L0 <64ns, L1 <1us
ClockPM- Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x8, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range BC, TimeoutDis+
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB
Capabilities: [d0] Vital Product Data
Unknown small resource type 00, will not decode more.
Capabilities: [a8] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [c0] MSI-X: Enable+ Count=15 Masked-
Vector table: BAR=1 offset=00002000
PBA: BAR=1 offset=00003800
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-
Capabilities: [138 v1] Power Budgeting <?>
Kernel driver in use: megaraid_sas
Kernel modules: megaraid_sas
答案1
简单的...
$ sudo setarch x86_64 --uname-2.6 /opt/MegaRAID/MegaCli/MegaCli64 -adpCount
Controller Count: 1.
Exit Code: 0x01
答案2
MegaCli 8.02.16 及更早版本不支持 uname 3.xx [1]。这个问题稍后可能会修复。
现在你需要一个解决方法[2]:
$ mkdir fakeuname
$ cd fakeuname
$ wget http://supportex.net/files/fakeuname/fakeuname.c
$ gcc -Wall -fPIC -c fakeuname.c
$ gcc -Wall -shared -o libfakeuname.so fakeuname.o
$ sudo install -m 644 libfakeuname.so /opt/MegaRAID/MegaCli/
$ sudo -i
# cd /opt/MegaRAID/MegaCli/
# LD_PRELOAD=./libfakeuname.so ./MegaCli64 -adpCount
Controller Count: 1.
Exit Code: 0x01
答案3
只需使用此指令 -http://sysadmin.te.ua/linux/monitoring-systems/smart-under-lsi-2108-kontroller.html。最好使用 megacli -LdPdInfo -aAll 来获取每个虚拟驱动器的 ID 列表。问候。