Odd SnapRaid behavior: Manual diff/sync works, scheduled diff doesn't

  • Good day!


    I am facing some issues with SnapRaid and I have no idea where the issue might be. My system has one parity drive and two pooled drives. Snapraid is configured as follows:


    The scheduled diff is configured as follows:


    Finally, the snapraid config looks like this:

    The issue I am having is that the scheduled diff is running, but not properly. The scheduled diff runs every night at midnight, but it is behaving oddly:

    - After the diff happens, there is no notification email (notifications are working, I already checked that). Hence n

    - The diff is registered in the system logs, but says that no changes were detected (although there are indeed file changes). As a consequence, no synchronization happens.


    If I run the diff command from the OMV interface manually, the diff works as expected and detects the file changes. A consequent sync commands also works as expected.


    I just recently changed the parity drive and replaced one of the data drives. Before that, the scheduled diff was not working because in the snapraid configuration page I had not selected a default array. After the drive replacements, everything was working as expected. I then checked the scheduled diff and realized that there were two automated tasks to do the same thing: one of them was generated by the scheduled diff option, the other one was perhaps a carry over from my older OMV installation. I removed the old scheduled task and modified the new one to run daily. Since then, I am having the issues above.


    Things that I have tried:

    - Delete all snapraid scheduled tasks and create new ones

    - Check that the correct array is selected under "default array"


    Finally, I suspect that the issue is in the command sent by the scheduled tasks:

    Code
    for conf in /etc/snapraid/omv-snapraid-*.conf; do /usr/sbin/omv-snapraid-diff ${conf}; done

    The correct snapraid conf file is not omv-snapraid-*, but omv-snapraid-XXXXXXXX (where XXXXXXX is a long-ass string identifying the array I assume). Could it be that the scheduled diff fails since the wrong conf file is being addresed? If so, any suggestions how to tackle that?


    Thanks in advance, and a happy new year)

  • Well, this is embarrassing. Seems like restarting the server was all that it took to solve the issue. Funnily enough, I have restarted the server several times over the past few days due to updates and, well. Because of the hard drive replacements.

    The scheduled script diff ran at midnight as expected, and I got notified per email as it should. Seems to me then that a reboot was necessary for the Cron jobs and/or the snapraid plugin configuration to apply properly.

    Custom mini-ITX builld
    Jonsbo N2, Asus Q170T, Intel Core i5-7600, 16 GB DDR4 Ram, 128 GB NVME (OS), X3 1 TB storage + 2,7 TB HDD parity


    "Two points define a line. Three points define a plane. Four points define a Dorito"


  • Eryan

    Added the Label resolved

Participate now!

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