# lspci -nn | grep -i raid 23:00.0 RAID bus controller [0104]: LSI Logic / Symbios Logic MegaRAID SAS-3 3108 [Invader] [1000:005d] (rev 02) # lshw -c storage *-storage description: RAID bus controller product: MegaRAID SAS-3 3108 [Invader] vendor: LSI Logic / Symbios Logic physical id: 0 bus info: pci@0000:23:00.0 logical name: scsi0 capabilities: storage pm pciexpress vpd msi msix bus_master cap_list rom configuration: driver=megaraid_sas latency=0 |
# lshw -c disk | egrep -e disk -e size\: -e name -e physical -e "logical name" *-disk:0 physical id: 2.0.0 logical name: /dev/sda size: 557GiB (598GB) *-disk:1 physical id: 2.1.0 logical name: /dev/sdb size: 1116GiB (1198GB) *-disk:2 physical id: 2.3.0 logical name: /dev/sdc size: 1116GiB (1198GB) # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 557.9G 0 disk |-sda1 8:1 0 2G 0 part /boot |-sda2 8:2 0 50G 0 part / |-sda3 8:3 0 8G 0 part [SWAP] |-sda4 8:4 0 1K 0 part |-sda5 8:5 0 8G 0 part /var sdb 8:16 0 1.1T 0 disk |-sdb1 8:17 0 1.1T 0 part sdc 8:32 0 1.1T 0 disk |-sdc1 8:33 0 1.1T 0 part To see hard disk parameters: # hdparm -I /dev/ |
Ref URL: https://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS The megaraid_sas is part of OL kernel, hence it should be present on the system. # modinfo megaraid_sas filename: /lib/modules/4.1.12-61.1.9.el6uek.x86_64/kernel/drivers/scsi/megaraid/megaraid_sas.ko description: Avago MegaRAID SAS Driver version: 06.810.09.00-rc1 license: GPL ...shortened ... |
MegaCLI Version /opt/MegaRAID/MegaCli/MegaCli64 -v HW RAID card info /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL Enclosure info /opt/MegaRAID/MegaCli/MegaCli64 -EncInfo -a0 Get number of Physical Drives on Adapter /opt/MegaRAID/MegaCli/MegaCli64 -PDGetNum -aALL List Hard Disks /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL List Virtual Drive info /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL Display Configuration /opt/MegaRAID/MegaCli/MegaCli64 -CfgDsply -aALL Show summary /opt/MegaRAID/MegaCli/MegaCli64 -ShowSummary -a0 Show physical drives inside virtual drives /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL | grep -E "Virtual Drive:|Slot Number:" | xargs | sed -r 's/(Slot Number:)(\s[0-9]+)/\2,/g' | sed 's/(Target Id: .)/Physical Drives ids:/g' | sed 's/Virtual Drive:/\nVirtual Drive:/g' Example of output: Virtual Drive: 0 Physical Drives ids: 0, Virtual Drive: 1 Physical Drives ids: 2, Virtual Drive: 3 Physical Drives ids: 1, |
megacli -CfgLdAdd -rX[enclosure_id:physical_id,enclosure_id:physical_id] -aN X = 5 (-r5 for RAID5) enclosure_id=252 physical_id= |
megacli -CfgLdAdd -r5[252:1,252:3,252:4,252:5,252:6] -a0 Adapter 0: Created VD 1 Adapter 0: Configured the Adapter!! Exit Code: 0x00 |
Virtual Drive: 0 Physical Drives ids: 0, Virtual Drive: 1 Physical Drives ids: 1, 3, 4, 5, 6, Virtual Drive: 2 Physical Drives ids: 2, |
(parted) mklabel New disk label type? gpt |
(parted) mkpart primary File system type? [ext2]? Start? 0% End? 100% (parted) p Model: LSI MR9361-8i (scsi) Disk /dev/sdb: 4796GB |
(parted) mkfs Yes/No? Yes Partition number? 1 File system type? [ext2]? ext2 (parted) p Number Start End Size File system Name Flags 1 1049kB 4796GB 4796GB ext2 primary |
# tune2fs -O extents,uninit_bg,dir_index,has_journal /dev/mapper/3600605b00ba10960206c1641632c2c0fp1 tune2fs 1.43-WIP (20-Jun-2013) Creating journal inode: done This filesystem will be automatically checked every 30 mounts or 0 days, whichever comes first. Use tune2fs -c or -i to override. |
# e2fsck -pf /dev/mapper/3600605b00ba10960206c1641632c2c0fp1 /dev/mapper/3600605b00ba10960206c1641632c2c0fp1: Backing up journal inode block information. /dev/mapper/3600605b00ba10960206c1641632c2c0fp1: Moving journal from /.journal to hidden inode. /dev/mapper/3600605b00ba10960206c1641632c2c0fp1: Adding dirhash hint to filesystem. /dev/mapper/3600605b00ba10960206c1641632c2c0fp1: 11/585449472 files (0.0% non-contiguous), 18405758/1170897408 blocks |
/dev/mapper/3600605b00ba10960206c1641632c2c0fp1 /raidpool ext4 defaults 1 2 |