Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server that peforms a resync for its software raid in undefined intervals. This results in massive load and I am forced to stop all services until the resync is complete (20+ hours). What could be the reason for an automatic resync?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

In some cases, cron. On RedHat-derived boxes, check for the existence of a file like /etc/cron.weekly/99-raid-check; on other distros, it can be a file in the /etc/cron.d/ directory.

Edit following your question: a check is not the same as a resync. A check compares the two halves of a RAID-1 array and updates /sys/block/mdX/md/mismatch_cnt with the current count of differences between the two halves. But it requires reading every single bit of both halves of the mirror, and is thus hugely IO-intensive (well, input-intensive).

If you find the mismatch count is non-zero, you can then choose to force a resync. Your system's script may do that for you as part of the service, I can't comment, but there is a difference between a check and a resync. Both are hugely IO-intensive, though, and result in the sort of performance issues you describe.

share|improve this answer
    
It's a debian box. I found /etc/cron.d/mdadm, In it stands 57 0 * * 0 root [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ] && /usr/share/mdadm/checkarray --cron --all --quiet Does a check automatically result in a resync? –  Philip Apr 4 '11 at 17:21
1  
@Philip, see the comment in that file. It runs a resync the first sudany of every month. That file is a script so you could easily look at it. Also see its configuration file /etc/default/mdadm. –  Zoredache Apr 4 '11 at 17:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.