Checking a linux MD raid array
Sorry for the long delay in posting. Illness and long work hours prevented much time for this, but I just wanted to offer this little tidbit…
For those of you familiar with Linux, you may be aware that it supports both hardware and software RAID types. Naturally hardware RAID tends to make better use of the resources available due to things such as bus and CPU offloading, but software RAID typically leaves you with more control should something disastrous happen.
In this little post I’ll go over a quick-and-easy method of verifying the soft-RAID array. A lot of sysadmins I know will use mdadm to force a rebuild which is…clunky at best. I believe the example below to be safer. In my example, my RAID array will be md0.
fs1:/ # cd /sys/block/md0/md
fs1:/sys/block/md0/md # echo check >sync_action
[Wait a few moments]
fs1:/sys/block/md0/md # cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdc1[0] sde1[3] sdd1[1]
1953503488 blocks super 1.0 level 5, 128k chunk, algorithm 0 [3/3] [UUU]
[>....................] check = 3.1% (30306176/976751744) finish=283.3min speed=55672K/sec
bitmap: 0/466 pages [0KB], 1024KB chunk
unused devices: <none>
Thanks man, I was looking all over for a simple post that explained what sync_action does.