MegaCLI - shawfdong/hyades GitHub Wiki
MegaCLI is command line utility by LSI. One can use this utility to configure, monitor, and maintain the MegaRAID SAS RAID controllers and the devices connected to them[1].
MegaCLI is in the Ports Collection[2].
Update /usr/ports:
# portsnap fetch update
Install Portmaster:
# cd /usr/ports/ports-mgmt/portmaster # make install clean
If running FreeBSD 9.x, ensure that the Ports Collection registers new software with pkg:
# echo 'WITH_PKGNG=yes' >> /etc/make.conf
Search for MegaCLI:
# cd /usr/ports # make search name=megacli
Install MegaCLI:
# cd /usr/ports/sysutils/megacli # make install clean
MegaCli was probably conceived by a very twisted mind. There are tons of very opaque command line options but very little documentation! Here are some useful commands.
Show help:
# MegaCli -help
List information about the RAID adapter(s):
# MegaCli -AdpAllInfo -aAll
List information about enclosures:
# MegaCli -EncInfo -aALL
List information about physical drives:
# MegaCli -PDList -aAll # MegaCli -PDlist -a0 | grep -e '^Enclosure Device ID:' -e '^Slot Number:'
List information about the physical drive in slot 1 of enclosure 9:
# MegaCli -pdInfo -PhysDrv '[9:1]' -a0
List information about virtual disks:
# MegaCli -LDInfo -Lall -aAll
List information about the BBU (battery backup-up unit):
# MegaCli -AdpBbuCmd -aAll