So I’m currently expanding a mdadm RAID6 from 4 2TB disks to 5 2TB disks.
The mdadm script on the host with the array returns the following error:
/etc/snmp/mdadm: line 84: let: 5 (4): syntax error in expression (error token is “(4)”)
/etc/snmp/mdadm: line 85: [: -lt: unary operator expected
{“data”:[{“name”:“md3”,“level”:“raid6”,“size”:“4000525058048”,“disc_count”:“5 (4)”,“hotspare_count”:“”,“device_list”:[“sdm1”,“sdn1”,“sdo1”,“sdp1”,“sdq1”],“missing_device_list”:,“state”:“clean”,“action”:“reshape”,“degraded”:“0”,“sync_speed”:“32571392”,“sync_completed”:“2”}],“error”:“0”,“errorString”:“”,“version”:“1”}
The following error is given from the poller.php on librenms host:
Load poller module applications
mdadm:-3:Invalid JSON
With debug:
Load poller module applications ####
SQL[ SELECT * FROM
applications
WHEREdevice_id
= ? [65] 0.6ms]SNMP[‘/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-Oqv’ ‘-m’ ‘NET-SNMP-EXTEND-MIB’ ‘-M’ ‘/opt/librenms/mibs’ ‘udp:HOSTNAME:161’ ‘nsExtendOutputFull.5.109.100.97.100.109’]
/etc/snmp/mdadm: line 84: let: 5 (4): syntax error in expression (error token is "(4)")
/etc/snmp/mdadm: line 85: [: -lt: unary operator expected
{"data":[{"name":"md3","level":"raid6","size":"4000525058048","disc_count":"5 (4)","hotspare_count":"","device_list":["sdm1","sdn1","sdo1","sdp1","sdq1"],"missing_device_list":,"state":"clean","action":"reshape","degraded":"0","sync_speed":"33653760","sync_completed":"2"}],"error":"0","errorString":"","version":"1"}
mdadm:-3:Invalid JSON
No other errors are shown in the poller output.
So it doesn’t like the fact that the number of disks has changed.