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.
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.
Format and mount
Hardware RAID Group may be named /dev/sdX
or something else more exotic like, for example with HP SmartArray controller, dev/ccissX
.
- 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 filesystem 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