I have a system with megaraid and I needed to add a new logical drive. I wanted to do it without rebooting, so I started looking around. I got the MegaCLI from LSI's website and was dismayed by it's apparent lack of documentation.
I found this page on le-vert.net that explained how to do everything. Phew.
List the drives
[<a href="mailto:root@server">root@server</a> ~]# MegaCli64 -PDlist -a0 |grep -A1 "Enclosure Device" Enclosure Device ID: 32 Slot Number: 0 -- Enclosure Device ID: 32 Slot Number: 1 -- Enclosure Device ID: 32 Slot Number: 2 -- Enclosure Device ID: 32 Slot Number: 3 -- Enclosure Device ID: 32 Slot Number: 4 -- Enclosure Device ID: 32 Slot Number: 5 -- Enclosure Device ID: 32 Slot Number: 6 -- Enclosure Device ID: 32 Slot Number: 7 </blockquote>List the logical devices
[<a href="mailto:root@server">root@server</a> ~]# MegaCli64 -LDInfo -Lall -a0 Adapter 0 -- Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name : RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3 Size : 544.5 GB State : Optimal Strip Size : 64 KB Number Of Drives : 5 Span Depth : 1 Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU Access Policy : Read/Write Disk Cache Policy : Disk's Default Encryption Type : NoneCreate the device using the disk names
The drive showed up right way, cool. 8-)[<a href="mailto:root@server">root@server</a> ~]# MegaCli64 -CfgLdAdd -r0 [32:5,32:6,32:7] -a0 Adapter 0: Created VD 1 Adapter 0: Configured the Adapter!! Exit Code: 0x00 [<a href="mailto:root@server">root@server</a> ~]# dmesg |tail sdb: Write Protect is off sdb: Mode Sense: 1f 00 00 08 SCSI device sdb: drive cache: write back SCSI device sdb: 2927099904 512-byte hdwr sectors (1498675 MB) sdb: Write Protect is off sdb: Mode Sense: 1f 00 00 08 SCSI device sdb: drive cache: write back sdb: unknown partition table sd 0:2:1:0: Attached scsi disk sdb sd 0:2:1:0: Attached scsi generic sg3 type 0
Add new comment