S/W RAID resync’ing all the time

Ever wondered why the heck mdadm & Co did not complain about failing drives, but the system was sluggish and blinked HDD activity LEDs as crazy? That's how it looked in my case:
[root@lemon ~]# cat /proc/mdstat
Personalities : [raid10] [raid6] [raid5] [raid4]
md5 : active raid5 sda3[0] sdb3[1] sdc3[2] sdd3[3]
     5809906944 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
     [============>........]  resync = 63.2% (1224003712/1936635648) finish=2185.5min speed=5432K/sec
     bitmap: 1/231 pages [4KB], 4096KB chunk

I was observing this very often, thinking that one of my new drives went wonky already. Not to worry about: it was simply the kernel that did not display checking correctly, instead it wrote resync.

The following commands will reveal the real info about what's happening on the system:
cat /sys/block/mdX/md/array_state
cat /sys/block/mdX/md/sync_action

The remedy was simple (RedHat distros and alike):
vi /etc/sysconfig/raid-check

Then one can force re-checking arrays if needed by typing the following:
echo check > /sys/block/mdX/md/sync_action

Leave a Reply

Your email address will not be published. Required fields are marked *