Snapraid SCRUB-Cycle count not taking days with nothing to do in consideration

  • Hi,

    It is in my understanding that in the snapraid configuration page, when you click on "Schedule Diff" then save it create a script "/usr/sbin/omv-snapraid-diff" populated with the info you put under "Diff Script settings" in the said configuration page.

    My needs (might evolve) were to sync everyday without updated/deleted thresholds and scrub 25 percent of the array every week.

    It appeared to be working great the first few days as I had always new of updated files. And each morning I had the pleasure to be greeted by a nice email keeping me informed of what happened: (Seriously, I love it)

    BUT one morning, as i was drinking my coffee and checking my emails... None from my NAS...

    A tad worried I started looking for the reason, which seems to be an error in the script. (But please tell me if I'm wrong, I am slowly learning...) The logs:

    I think the script stops after a DIFF if the output is "nothing has changed".

    Why is it an issue I hear you ask. Well the day after, the script ran and found some changes, sync the array and send me an email. At the end of the email I notice that the SCRUB-Cycle count missed one day, the day the script stopped at " Nothing has changed, nothing to do".

    What should I change in the script so it would still take in consideration the times it runs even if nothing changed in the array in the SCRUB-Cycle count?

    Thank you

  • Unipo

    Added the Label OMV 5.x
  • You're SYNC'ing everyday?

    There's a sequence of operations that's needed to keep a SNAPRAID array clean. Without house cleaning operations, the SYNC command is simply reassigning new checksums to files regardless of their condition, corrupted or not. House keeping must be done before a SYNC operation. Here's a -> link to a sequence of SNAPRAID operations I used on a backup server.

    The purpose of a diff script is described. It's a barrier set up to prevent over writing the last SYNC operation so, if a large number of files are deleted, changed, etc., (exceeding the threshold set) a new SYNC operation is halted. This preserves the last SYNC state as a potential recovery point; allowing for files, folders or even a full drive to be restored to their condition as of the last SYNC operation, before a potential data disaster event occurred.

Participate now!

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