eLvErDe / hwraid

HWRaid: Free code from http://hwraid.le-vert.net
GNU General Public License v2.0
273 stars 103 forks source link

megagli not working completely on debian 12 (Segmentation fault) #144

Open eppesuig opened 9 months ago

eppesuig commented 9 months ago

Hello, a week ago I installed and configured a new LSI card on a debian 12 machine. I noticed that many commands fail while checking the controller information. Example:

# megaclisas-status --notemp
-- Controller information --
Segmentation fault
-- ID | H/W Model                | RAM    | Temp | BBU    | Firmware     
c0    | LSI MegaRAID SAS 9285-8e | 1024MB | N/A  | Good   | FW: 23.1.1-0017 

-- Array information --
-- ID | Type   |    Size |  Strpsz | Flags | DskCache |   Status |  OS Path | CacheCade |InProgress   
c0u0  | RAID-5 |  18190G |   64 KB | RA,WB | Disabled |  Optimal | /dev/sda | None      |None         

-- Disk information --
-- ID   | Type | Drive Model                              | Size     | Status          | Speed    | Temp | Slot ID  | LSI ID  
c0u0p0  | HDD  | V1GK5YUG WDC WD4003FRYZ-01F0DB0 01.01H01 | 3.637 TB | Online, Spun Up | 6.0Gb/s  | N/A  | [252:0]  | 24      
c0u0p1  | HDD  | V1GJG4KB WDC WD4003FRYZ-01F0DB0 01.01H01 | 3.637 TB | Online, Spun Up | 6.0Gb/s  | N/A  | [252:1]  | 22      
c0u0p2  | HDD  | V1GJEZKB WDC WD4003FRYZ-01F0DB0 01.01H01 | 3.637 TB | Online, Spun Up | 6.0Gb/s  | N/A  | [252:2]  | 21      
c0u0p3  | HDD  | V1GJG3ZB WDC WD4003FRYZ-01F0DB0 01.01H01 | 3.637 TB | Online, Spun Up | 6.0Gb/s  | N/A  | [252:4]  | 26      
c0u0p4  | HDD  | V1GJG4PB WDC WD4003FRYZ-01F0DB0 01.01H01 | 3.637 TB | Online, Spun Up | 6.0Gb/s  | N/A  | [252:5]  | 25      
c0u0p5  | HDD  | V1GJG02B WDC WD4003FRYZ-01F0DB0 01.01H01 | 3.637 TB | Online, Spun Up | 6.0Gb/s  | N/A  | [252:6]  | 23      

you may notice the "Segmentation fault" on line 2. Some commands work, as for megacli -AdpAllInfo -aAll, megacli -PDList -a0, and megacli -LDInfo -L0 -a0. Some other fails, as for the battery information:

# megacli -AdpBbuCmd -aALL

BBU status for Adapter: 0

BatteryType: iBBU-09
Voltage: 4058 mV
Current: 0 mA
Temperature: 22 C
Battery State: Optimal
Segmentation fault

Please note that Debian 12 has this kernel:

# uname -a
Linux mantide 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux

And note that megacli has been downloaded from the bullseye repository since it is missing from the bookworm:

# apt policy megacli
megacli:
  Installato: 8.07.14-3+Debian.11.bullseye
  Candidato:  8.07.14-3+Debian.11.bullseye
  Tabella versione:
 *** 8.07.14-3+Debian.11.bullseye 500
        500 http://hwraid.le-vert.net/debian bullseye/main amd64 Packages
        100 /var/lib/dpkg/status

Thank you, Giuseppe