Fácil ...
$ sudo setarch x86_64 --uname-2.6 /opt/MegaRAID/MegaCli/MegaCli64 -adpCount
Controller Count: 1.
Exit Code: 0x01
Tenho cerca de meia dúzia de servidores, todos executando o controlador RAID Intel RS2BL080 no servidor Oneiric AMD64. Ele funciona bem usando o módulo do kernel megaraid_sas, mas quando eu tento usar o megacli para testar a placa, ele me diz que não há controladores RAID disponíveis.
A Intel não tem o Ubuntu como sistema operacional suportado, então eles não puderam me ajudar. Depois de olhar ao redor, eu encontrei referenciado deste controlador megaraid funcionando bem para outras pessoas.
Basta entrar em contato com alguém que possa saber o que estou fazendo de errado.
$ 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
Fácil ...
$ sudo setarch x86_64 --uname-2.6 /opt/MegaRAID/MegaCli/MegaCli64 -adpCount
Controller Count: 1.
Exit Code: 0x01
MegaCli 8.02.16 e anteriores não entendem uname 3.x.x [1]. Isso pode ser corrigido depois.
Por enquanto você precisa de uma solução alternativa [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
Use esta instrução - link . E é melhor usar megacli -LdPdInfo -aTodos para obter uma lista de IDs para cada unidade virtual. Atenciosamente.