====== LSI MegaRAID controllers ====== StorCLI is the successor of the MegaCLI and allows Command Line Tools to manage and control LSI MegaRAID controllers. You can download it by Broadcom ===== Add a disk to an existing RAID ===== Show all RAID controllers # storcli show all If the controller has the ID 0, then add /c0 # storcli /c0 show all If an virtual disk for example RAID 5 exist, here v0, then you 'll see it {{hardware:storcli_disk02.png?600|}} You can also see all attached physical disks on this adapter {{hardware:storcli_disks01.png?600|}} Choose the disk in state UGOOD to add to the RAID # storcli /c0/v0 start migrate type=raid5 option=add drive=134:5 Check the RAID expansion progress, indicate also the duration # storcli /c0/v0 show migrate {{hardware:storcli_disk03.png?600|}} ===== Command line ===== Information for general use: /cx bzw. /vx stands for the Controller/Virtual Drive Number. /ex bzw. /sx stands for the Enclosure/Slot ID. Additional information is also available in the LSI StorCLI manual.[1] Firmware Update sudo storcli /cx download file=/path/to/firmware.rom Information on the Controller and Configuration sudo storcli /cx show all Activation of Features (e.g. CacheCade, FastPath,...) sudo storcli /cx set aso key=AAAAAAAABBBBBBBBCCCCCCCC Information on the existing hard drives and their status (IDs,...) sudo storcli /cx /eall /sall show (all) Information on the existing virtual drives and their status sudo storcli /cx /vall show (all) View current status of all rebuilds sudo storcli /cx /eall /sall show rebuild Creating a Virtual Drive sudo storcli /cx add vd type=[RAID0(r0)|RAID1(r1)|...] drives=[EnclosureID:SlotID|:SlotID-SlotID|:SlotID,SlotID] Example: sudo storcli /cx add vd type=r1 drives=252:0-2 Initializing a VD sudo storcli /cx/vx start init (force) Progress can be monitored using the following command: sudo storcli /cx/vx show init Creating a CacheCade device sudo storcli /cx add vd cc type=r[0,1,10] drives=[EnclosureID:SlotID|:SlotID-SlotID|:SlotID,SlotID] WT|WB (assignvds=0,1,2) Example: sudo storcli /c0 add vd cc type=r1 drives=252:2-3 WB CacheCade activation/deactivation sudo storcli /cx/[vx|vall] set ssdCaching=[on|off] Example: sudo storcli /c0/v1 set ssdCaching=on Removing a CacheCade device sudo storcli /cx/vx del cc Removing a VD sudo storcli /cx/vx del (force) Incorporating an improperly removed device If an improperly removed device is reconnected to the RAID controller it will be recognized as UBAD (Unconfigured Bad). sudo storcli /c0 /eall /sall show Controller = 0 Status = Success Description = Show Drive Information Succeeded. Drive Information : ================= ------------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp ------------------------------------------------------------------------------- 252:0 7 Onln 0 465.25 GB SATA HDD N N 512B WDC WD5003ABYX-01WERA1 U 252:1 6 Onln 1 465.25 GB SATA HDD N N 512B WDC WD5003ABYX-01WERA1 U 252:2 5 UGood - 465.25 GB SATA HDD N N 512B WDC WD5003ABYX-01WERA1 U 252:3 4 UBad - 223.062 GB SATA SSD N N 512B INTEL SSDSC2CW240A3 U ------------------------------------------------------------------------------- EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign UGUnsp-Unsupported This status must be changed to UGOOD. sudo storcli /cx /ex /sx set good Controller = 0 Status = Success Description = Show Drive Information Succeeded. Drive Information : ================= ------------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp ------------------------------------------------------------------------------- 252:0 7 Onln 0 465.25 GB SATA HDD N N 512B WDC WD5003ABYX-01WERA1 U 252:1 6 Onln 1 465.25 GB SATA HDD N N 512B WDC WD5003ABYX-01WERA1 U 252:2 5 UGood - 465.25 GB SATA HDD N N 512B WDC WD5003ABYX-01WERA1 U 252:3 4 UGood F 223.062 GB SATA SSD N N 512B INTEL SSDSC2CW240A3 U ------------------------------------------------------------------------------- EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign UGUnsp-Unsupported Now the device is foreign in the pool sudo storcli /cx /fall show Controller = 0 Status = Success Description = Operation on foreign configuration Succeeded FOREIGN CONFIGURATION : ===================== ---------------------------------------- DG EID:Slot Type State Size NoVDs ---------------------------------------- 0 - Cac0 Frgn 223.062 GB 1 ---------------------------------------- NoVDs - Number of VDs in disk group|DG - Diskgroup Total foreign drive groups = 1 Now it can be included in the configuration. sudo storcli /cx /fall import If the device was part of a RAID a rebuild is performed automatically (see the state: Rbld in the overview). The following command progress can be monitored: sudo storcli /cx /ex /sx show rebuild