How to stop RAID check in Linux

When you don’t have hardware based RAID solution available, software RAID is very useful if you wish to achieve maximum performancec out of your disks and data safety. However, I’ll not be discussing pros and cons of hardware based RAID or, software based RAID.

Any level of software RAID except RAID 0 requires RAID consistency check on every Monday. While the consistency check is going on read / write speed will be slower than normal which may even cause overload in a production server. Now I’m not saying that this consistency check is not important but in most cases this will make things bad specialy when you have slow HDD disks in your RAID array. Let’s see how we can stop this RAID consistency check –

Running this command should stop the RAID check immidiately.

mdadm –misc –action=idle /dev/md127

Note that you may need to replace md127 with the RAID array name you want to stop the check for on your server. If you wish to stop the RAID presistent check permanently then you need to add a cron job as below –

crontab -e
0 0 * * MON /usr/sbin/mdadm --misc --action=idle /dev/md127 > /dev/null 2>&1

This cronjob will make sure that RAID consistency check is stopped right away on every Monday. In case these doesn’t work for you, feel free to write a comment with the output content of cat /proc/mdstat

Add comment

About Author

Tonmoy Ajize

Hey There! I am Tonmoy Ajize from Dhaka, Bangladesh. I am a Linux System Administrator and Customer Success Specialist.