neomantra / lsi.sh

MegaCLI script to configure and monitor LSI raid cards.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lsi.sh

This is a public repository for the lovely wrapper script created by Calomel.org for the LSI hardware RAID command line tool MegaCLI, provided Creative Commons Attribution-ShareAlike 4.0 International license.

Their original description was simply:

Calomel.org 
    https://calomel.org/megacli_lsi_commands.html
    LSI MegaRaid CLI 
    lsi.sh @ Version 0.05

description: MegaCLI script to configure and monitor LSI raid cards.

Building on the shoulder of giants, I have added a little "autoconfiguration", pathing for the default Ubuntu package, and a couple small additions to their script to make dealing with an LSI RAID system a little easier.

I'm hoping by putting this out there to encourage further development and extensions to try and bring MegaCLI under control.

You can specify the MegaCLI path and enclosure by setting the following environment variables:

EnvVar Name Default Description
MEGACLI /opt/MegaRAID/MegaCli/MegaCli64 if detected, else /usr/sbin/megacli Full path to MegaCLI binary
ENCLOSURE Detected by lsi.sh Enclosure number to scan

Environment

I'm working under an Ubuntu/Debian environment, but I think the only real change that anybody on any *nix would need make is in the MegaCli variable at the top of the file.

To get a proper scriptable package for Ubuntu and deployments, I followed the instructions here, from another very useful LSI MegaRAID resource.

An additional shout out to the useful RAID wiki on kernel.org for their information on MegaCli.

About

MegaCLI script to configure and monitor LSI raid cards.

License:Creative Commons Attribution Share Alike 4.0 International


Languages

Language:Shell 100.0%