[[TOC(depth=-1)]] = LSI MegaRAID = [[Image(wiki:LSI:logo_lsi.gif)]] [[BR]][[BR]] = 1. Card information = MegaRAID is the legacy high-end RAID controllers series by LSI. [[BR]]It is fully hardware RAIDs controllers supporting RAID5, at least, with various SCSI interfaces. [[BR]]If you're a looking for information about MegaRAID with SAS or SATA connectors, please look at [wiki:LSIMegaRAIDSAS] instead. All theses card can be used with stock Linux kernel which includes a '''working driver'''. [[BR]]Both '''opensource reporting''' tool and '''proprietary management''' utilities exists. Even there are old and deprecated, theses cards are a '''good choice''' for Linux, because of their '''great support'''. [[BR]] = 2. Linux kernel drivers = || Driver || Supported cards || || megaraid_mm & megaraid_mbox || LSI MegaRAID || ''megaraid_mm'' and ''megaraid_mbox'' have been part of the mainstream Linux kernel for a while and should be '''available''' in all '''current Linux distributions'''. If your card use ''megaraid_sas'' driver, please lookg at [wiki:LSIMegaRAIDSAS] instead. Some ''lspci -nn'' output examples: * 02:0e.0 RAID bus controller ![0104]: Dell !PowerEdge Expandable RAID controller 4 ![1028:0013] (rev 06) * 04:03.0 RAID bus controller ![0104]: Dell !PowerEdge Expandable RAID controller 4/Di ![1028:000f] (rev 02) * 02:04.0 RAID bus controller ![0104]: American Megatrends Inc. MegaRAID ![101e:1960] (rev 02) * 02:03.0 RAID bus controller ![0104]: LSI Logic / Symbios Logic MegaRAID ![1000:1960] (rev 01) [[BR]] = 3. Management and reporting tools = As theses cards are quite old, many tools exists to monitor and manage them. [[BR]] The first one is an '''opensource''' tool named '''megactl''' which can be used to report controller and disks status. For the '''management''' side, you can you '''megamgr''', which is a '''proprietary''' utility from LSI. == 3.1. megactl == === 3.1.1. Quickstart and output example === Print current controller status: {{{ server:~# megactl a0 PERC 4/Di chan:2 ldrv:1 batt:good a0d0 273GiB RAID 5 1x3 optimal a0c0t0 136GiB a0d0 online a0c0t1 136GiB a0d0 online a0c0t2 136GiB a0d0 online }}} {{{ server:~# megactl a0 MegaRAID SCSI 320-1 chan:1 ldrv:2 batt:FAULT, module missing a0d0 68GiB RAID 1 1x2 optimal a0d1 137GiB RAID 10 2x2 optimal a0c0t0 68GiB a0d0 online a0c0t1 68GiB a0d0 online a0c0t2 68GiB a0d1 online a0c0t3 68GiB a0d1 online a0c0t4 68GiB a0d1 online a0c0t5 68GiB a0d1 online }}} There are several switches which are interresting: * '''-H''': Only print lines which are not ok.[[BR]]If nothing is printer, everything is fine * '''-B''': Ignore batttery problems when running -H.[[BR]]In fact megactl can't define if your controller has a battery or not.[[BR]]If you don't have one, use this parameter. === 3.1.2. SAS support and periodic checks === SAS support: ''megactl'' package includes a ''megasasctl'' command too. [[BR]]It works fine on '''old sas controller''' but fails with the latest one. [[BR]]Please read [wiki:LSIMegaRAIDSAS] for informations about SATA/SAS controllers. Periodic checks: You can write your own script around megactl to check your adapter status health periodically. [[BR]]However, I already did this for you. See '''megaraid-status''' below. == 3.2. megaraid-status == === 3.2.1. About megaraid-status === '''megaraid-status''' is a wrapper script around megactl with periodics checks. [[BR]]It is available in the packages repository too. [[BR]]The packages comes with a python wrapper around megactl and an initscript that '''periodic''' run this wrapper to '''check status'''. [[BR]]It keeps a file with latest status and thus is able to detect RAID '''status changes and/or brokeness'''. [[BR]]It will log a ligne to '''syslog''' when something failed and will send you a '''mail'''. [[BR]]Until arrays are healthy again a '''reminder''' will be sent each 2 hours. === 3.2.2. Wrapper output example === {{{ server:~# megaraid-status -- Arrays informations -- -- ID Type Size Status a0d0 RAID 5 273GiB optimal -- Disks informations -- ID Model Status a0c0t0 SEAGATE ST3146807LC online a0c0t1 SEAGATE ST3146807LC online a0c0t2 SEAGATE ST3146807LC online }}} {{{ server:~# megaraid-status -- Arrays informations -- -- ID Type Size Status a0d0 RAID 1 68GiB optimal a0d1 RAID 10 137GiB optimal -- Disks informations -- ID Model Status a0c0t0 MAXTOR ATLAS10K5_73SCA online a0c0t1 MAXTOR ATLAS10K5_73SCA online a0c0t2 MAXTOR ATLAS10K5_73SCA online a0c0t3 MAXTOR ATLAS10K5_73SCA online a0c0t4 MAXTOR ATLAS10K5_73SCA online a0c0t5 MAXTOR ATLAS10K5_73SCA online }}} == 3.3. megamgr & dellmgr == === 3.3.1. About megamgr === '''megamgr''' is a proprietary tool from LSI. [[BR]]It '''emulates the controller BIOS''' from Linux, which is really nice. [[BR]]However, it cannot be used to script some actions. That's why you need megactl for periodic health checks. === 3.3.2. Dell specific note === A '''Dell specific''' megamgr is also available. It's called '''dellmgr'''. [[BR]]Despites both megamgr and dellmgr seems to work on Dell megaraid-based RAID cards, I would advice you to '''use dellmgr on Dell hardware'''. === 3.3.3. Screenshots === [[Image(megamgr1.jpg)]] [[Image(megamgr2.jpg)]] == 3.4. About /dev/megadev0 == All theses tools requires this device node to be created. [[BR]]Since Linux kernel 2.6.25rc2, it's created dynamically by udev. [[BR]]On previous kernel, this has to be done by hand. Proprietary tools creates the device node at startup. [[BR]]I made some wrappers around binaries from megactl package to create the node if it doesn't exist yet. [[BR]] = 4. BIOS upgrade from a Linux system = Dell cards can be flashed using firmware-tools. [[BR]]See http://linux.dell.com/wiki/index.php/Repository/firmware for more informations. [[BR]]However this will only work on !RedHat, CentOS, SuSE and Fedora. Even Ubuntu is listed in the wikipage, LSI card upgrade is not supported. [[BR]]We use a Fedora 8 nfsroot booted by PXE to update our Dell's firmware running Debian. We don't have any informations yet about upgrading non-Dell cards. [[BR]][[BR]]