Hardware RAID information on Linux
Jump to navigation
Jump to search
Hardware RAID
A hardware RAID controller has its own processor for the calculation of RAID operations. This processor organizes and manages the memory space. Thus, the CPU of the server is not burdened by RAID calculations.
HBA/RAID controller provides high level summary for HBA and RAID controller.
RAID terminologies
Detect hardware RAID information
#Detect HW RAID controller information
$lspci -knn | grep -i raid
# install apt-get install lsscsi then list up HW raid manufacturer and model
$lsscsi
# Display the details about harddrives
$lshw -class disk
# 1 Find defined raid arrays then get device information
$dmesg | grep -i scsi
$smartctl --all /dev/<raid array>
# To check physical disk health values smartctl --all -d <driver> command
$ sudo smartctl --all -d megaraid,<disk #> /dev/<raid array>
smartctl page has more examples how to use smartctl and Identify a defective hard drive guides how to detect defective disk.
Hardware RAID device group name on Linux
Hardware RAID Group may be named /dev/sdX
or something else more exotic like, for example with HP SmartArray controller, dev/ccissX
.
Hardware RAID Group may be named on Linux like /dev/sdX, where X is a letter or something else more exotic depending on the controllers.
Controller type | Description |
---|---|
HP SmartArray controller | SmartArray-connected disks are named like /dev/cciss/cXdY, where X is the number of the SmartArray controller, and Y is the number of configured logical disk. When a SmartArray disk is partitioned, the partitions are accessible as /dev/cciss/cXdYpZ, where Z is the partition number.[1] |
LSI Logic Megaraid | use the standard Linux /dev/sdX names for RAID Groups |
RAID group partition, format and mount
- To check RAID group, use lsblk or blkid
- To partition, use parted. For example, following partition the raid group device name
sudo parted -s -a optimal <raid group device name> mklabel gpt mkpart primary 0% 100%;
- To format fiilesystem, use
mkfs.XXXX
whereXXXX
is the Linux File System Types you want to use. For example/sbin/mkfs.ext4 /dev/sda1
will format partition 1 of the first drive with Ext4 filesystem. - To mount partition, use mount command or /etc/fstab
RAID configuration Tips and trick
- If you are using hardware RAID devices, do not attempt to run software RAIDs on top of it.