LSI MegaRaid on XenServer

If you are like me, you may be interested in monitoring a XenServer host’s local LSI RAID controller. In particular, I wanted to see the status via SNMP, in order to tie into monitoring systems. You can also use the MegaRAID Storage Manager for viewing and configuring remotely and without having to reboot the host.

Switch the system to shadow passwords. This is required for the Storage Manager application, and it’s insane the XenServer doesn’t already run this way by default.

pwconv

Install the required packages. The .rpm files are all included in the download from LSI. Be sure to get the x86 version (not x64), as the XenServer dom0 is not 64 bit.

yum --enablerepo=base install net-snmp-utils
rpm -ivh Lib_Utils-1.00-09.noarch.rpm
rpm -ivh Lib_Utils2-1.00-02.noarch.rpm
rpm -ivh MegaRAID_Storage_Manager-12.05.03-00.noarch.rpm
rpm -ivh sas_ir_snmp-12.05-0201.i386.rpm

Add the following lines to /etc/sysconfig/iptables in order to allow Storage Manager and SNMP traffic. These lines should go right next to the similar lines for port 22, 80, etc.

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 161 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3071 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5571 -j ACCEPT

Apply the firewall changes

service iptables restart

Add the following line to /etc/snmp/snmpd.conf in order to permit reading LSI OIDs via the “public” community.

view    systemview    included   .1.3.6.1.4.1.3582

Finally enable/start all the services, and try an snmp query to make sure it works:

chkconfig vivaldiframeworkd on
chkconfig snmpd on
service vivaldiframeworkd start
service snmpd start
snmpwalk -v2c -c public 127.0.0.1 .1.3.6.1.4.1.3582

14 thoughts on “LSI MegaRaid on XenServer”

  1. Thank you very much for this! 🙂 Now I ‘m able to connect via MSM to my XENServer and configure the controller.

    I planed to setup an SNMP monitoring server to check the status of my arrays and notifiy me via email if an array is degraded. But if I do an SNMP walk on .1.3.6.1.4.1.3582 there is not much data displayed. :/

    A screenshot: http://schlimme.net/snmp.jpg

    I used the MIB from sas_ir_snmp-13.11-0100.i386.rpm

    I’m new to SNMP, maybe I’ve done something wrong?

    Best regards,

    Karsten

  2. Ah, I’ve one more thing to say:

    I couldn’t find the Lib_Utils-1.00-09.noarch.rpm so installed only the Lib_Utils2-1.00-02.noarch.rpm. Could that be the problem?

  3. It looks like the SNMP agent is working, but it’s not seeing any RAID cards. I would start by making sure vivaldiframeworkd is running, making sure the kernel modules are loaded (mpt*), and checking the kernel log (dmesg) for any clues.

  4. Any way to get the LSI MegaRAID Storage Manager Software (Windows) to be able to manage the controller?

  5. Thanks for this.

    Was trying to use MegaCLI before with some scripts to send emails when drives were in ‘missing’ status but it wasn’t working too well.

    Neadom, just put the IP of the server into the MegaRAID app on windows. You can even create a list of IP in the advanced settings too.
    Works just as well as it did when everything was on windows. No more playing with megaCLI!

    Now to deploy it to all our xen boxes. 🙂

  6. Thanks for this.

    Was trying to use MegaCLI before with some scripts to send emails when drives were in ‘missing’ status but it wasn’t working too well.

    Neadom, just put the IP of the server into the MegaRAID app on windows. You can even create a list of IP in the advanced settings too.
    Works just as well as it did when everything was on windows.

    Now to deploy it to all our xen boxes. 🙂

  7. I too had made many scripts to monitor the LSI Raid arrays in Mega CLI. I found that every time I upgraded Xenserver, my scripts stopped working and I would have to spend hours getting everything working again. So, I’ve been looking for a better option. This looks like exactly what I’m looking for. Unfortunately, I’m not an expert at Xenserver or linux. If anyone can offer some more details on this idea, I would gladly pay for it.

  8. Are you just trying to allow monitoring via SNMP? If so, the steps I’ve outlined in the article should work just fine. This setup isn’t likely to be broken by updates. I’ve done several updates on mine without any issues. Do you have any particular questions?

  9. Yes I have a few questions. If someone would like to help, please send me an email at tmckeown (at) upstaging.com
    I’ve been having troubles even finding all the files to install. I’m not much of a linux guy but I do want to be able to monitor our Xenservers MegaRaid cards.

  10. I have been trying to get this to work on XenServer 6.5 with no luck, Have you tried it on 6.5?

    Thanks for putting this together it worked great on 6.1

  11. I haven’t tried the latest version, but I don’t see any obvious reason why it would be a problem. XenServer is based on CentOS, so in general packages designed to work on CentOS will work. There are a few oddities (such as the shadow password thing), but otherwise it’s fairly standard. You can always give it a try on a test system. Even if it doesn’t have an LSI card in it, you can at least verify nothing breaks horribly.

Leave a Reply

Your email address will not be published. Required fields are marked *