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.
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.
Hello,
ReplyDeleteThank you for the post. Unfortunately not everything works after your steps. I have the problem, if I do an action on the raid drive I get the state write-pending and it never returns again. I described everything here:
http://ubuntuforums.org/showthread.php?t=1821067
Can you help me?
Kind Regards,
Iwan
Hello Iwan,
ReplyDeleteTo begin, for your RAID to be automagically seen at boot, in addition to /etc/mdadm.conf update, you must:
- ensure to have the persistent block (you miss it !): https://raid.wiki.kernel.org/index.php/RAID_setup#The_Persistent_Superblock
-> in other words, if your configuration file is on your RAID partition, it could not be read because the RAID is not active yet, and the RAID won't be active because the system could not read the configuration file (chicken and egg issue).
- ensure to have a good partition type, See https://raid.wiki.kernel.org/index.php/Partition_Types
-> in other words, I don't think it would work with a NTFS partition
Eventually, for your write-pending state, it seems your RAID needs to be resync: http://linuxmonk.ch/trac/wiki/LinuxMonk/Sysadmin/SoftwareRAID#CheckRAIDstate
Did it resync after you switched from fully Software RAID to pseudo Software RAID (with Intel controller) ?
HTH
Best Regards
Bertrand
Great post and some really useful tips there. I love resource lists like this. Have social bookmarked it in the hope that others can also benefit.
ReplyDeleteNice if it helps you.
ReplyDeleteThx for your comment.
Hello Bertrand,
ReplyDeleteI finally found it. I was using mdadm 3.1.4, it is in the repository of ubuntu natty 11.04. This version of mdadm does not really support IMSM that this is the real problem. I found it because I did not have mdmon and NeilBrown from the Linux-Raid mailing list (here the link to the email conversation http://marc.info/?t=131352617600002&r=1&w=2) wrote that mdmon is responsible to update the metadata of the array. But mdmon does not exists in this old version. So I downloaded the latest official relesae 3.2.1 and installed it via make && sudo make install. Now everything works perfectly. The array is available after reboot and the synchronization process works over BIOS and not over mdadm itself.
Maybe you could add the version problem to your initial blog entry?
Thank you for helping me through Email as well.
Kind Regards,
Iwan
I have Raid 1 with my Intel motherboard (are 2 hard disk sata 500gb), how rebuild the raid 1 with linux, please help me.
ReplyDeleteYou should find useful information there: https://raid.wiki.kernel.org/articles/r/e/c/Reconstruction.html
ReplyDeleteI got the issue that the raid array is not assembled at startup. Normaly after running mdadm --asssemble --scan the raid is build and thats it, but after rebooting it is gone again.
ReplyDeleteYou must update your configuration file: /etc/mdadm.conf
ReplyDeleteUse the last instruction of my initial post.
Nice article, thanks for sharing.
ReplyDelete