Sunday, July 17, 2011

Manage Intel RAID under GNU/Linux using mdadm tool

You may be interesting to read some history about RAID first.
This article is about managing Intel RAID, with mdadm tool, but some information may apply to others kinds.
To begin, you can find lots of information about RAID under GNU/Linux.

IMPORTANT: for Intel's IMSM support you need at least
version 3.2 of mdadm tool (thanks to Iwan for this information).

Usually, there is a container device (let's call it /dev/md127 in this article), and the RAID device (let's call it /dev/md126 in this article).
Instead of long blabla, this article will give some common commands to help manage Intel RAID with mdadm tool.

To report the RAID information from the Option ROM (for instance "Intel(R) Matrix Storage Manager"):
mdadm --detail-platform

To get general details:
mdadm -D /dev/md127

To examine information (including members):
mdadm -E /dev/md127

To assemble the RAID array inside the container, and/or to start it (the -e option declares the style of RAID metadata (superblock) to be used):
mdadm -I -e imsm /dev/md127

To check the current state:
cat /proc/mdstat

Output sample (with a RAID 10 having 4 members):
Personalities : [raid10]
md126 : active raid10 sda[3] sdb[2] sdc[1] sdd[0]
      3907023872 blocks super external:/md127/0 64K chunks 2 near-copies [4/4] [UUUU]
      [=>...................]  resync =  6.6% (258923904/3907024128) finish=305.7min speed=198882K/sec
     
md127 : inactive sdb[3](S) sda[2](S) sdc[1](S) sdd[0](S)
      9028 blocks super external:imsm

To add it to the configuration file (to be activated automagically at boot):
mdadm --examine --scan >> /etc/mdadm.conf

For advanced commands (including repairing), you should read this.

No comments:

Post a Comment