Linux tweaks..

Data scrubbing may render your RAID array unsable silently. To prevent that it is recommended that data concistency and bad block check is run regularly on RAID. This can be done by appending word check into /sys/block/mdX/md/sync_action, where X is your RAID device number.

[scode]
echo check >> /sys/block/mdX/md/sync_action
[/scode]

I was pretty shocked when I noticed that the check was going to take 15000 minutes which equals to 250 hours. I planned to run this check bi-weekly and with these numbers my RAID would have been busy checking bad blocks 75% of time. It seemed like something was not right in the RAID. Luckily there is lot of information about Linux software RAID and their tweaking in Internet. Couple tiny changes into /etc/rc.local fixed the issue and now we are talking about magnitude of 360 minutes instead of 15000. Here are the fixes I made.

[scode]
# This one alone helped the most
echo 4096 > /sys/block/md0/md/stripe_cache_size
# These two rows help with the read speed
blockdev –setra 4096 /dev/sd[a-d]
blockdev –setra 16384 /dev/md0
[/scode]

Leave a Reply