Scheduling RAID scrub via /etc/cron.d/mdadm

  • I previously customized the default scrubbing schedule set up by OMV by editing /etc/cron.d/mdadm like so:

    Code
    # edited this to run at 11:41pm every 2nd month on the first friday thanks to https://cron.help
    
    41 23 * */2 5 root if [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --idle --quiet; fi


    Today is Saturday, 1/10/26, and a RAID scrub started this afternoon around 3:30pm, I think. This was unexpected - then I noticed that mdadm was changed to mdadm.dpkg-bak at some point.

    I wonder if some other mechanism to schedule the scrub has replaced this cron.d file, but I can't quite track down what or where it is. I'd like to continue to use my custom schedule from above. What is the proper way to do this?

    Edited once, last by cubemin: Why is one always blind to typos until the exact moment of hitting submit? ().

  • I don't know what changed for you, but fwiw I schedule this for each array in the omv scheduled task list. This appears to still work. The scheduling is human readable too :-).


    echo check > /sys/block/md0/md/sync_action

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!