Hourly Cron Service openmediavault-cleanup_sf_snapshots fails

  • Since the update to version 6.4.0, I get mails from my nas with the following error message:

    Code
    run-parts: /etc/cron.hourly/openmediavault-cleanup_sf_snapshots exited with return code 1

    How can I find out what is causing the issue? Is there a log I can look into?

    I have not created an hourly cronjob myself, so it is not a user created job that fails. I use an software raid 5 with my nas and it uses the ext4 filesystem. I created the raid and filesystem with the web ui.

  • Same issue here:


    Zitat


    Add snapshot lifecycle management to clean up snapshots of shared folders according to given rules. The tool omv-sfsnapadm is called hourly by a cron job to do the cleanup. The settings can be found at Storage | Shared Folders | All Snapshots in the UI. This feature is disabled by default.


    I think it's related to this new addition

  • Cron runs the wrapper script every hour. Enabling/disabling the automatic cleanup setting won't change that. (Removing the wrapper script from the /etc/cron.hourly directory or making it non-executable would stop it from running.)


    The email is sent because the script that is called by the "openmediavault-cleanup_sf_snapshots" wrapper script returns an error (return code 1), and cron assumes that this return code means something went wrong. However, nothing actually went wrong, since that script checks your setting and exits (with return code 1) if automatic snapshot cleanup is disabled (which is the default).


    You can see the behavior by running:

    Code
    sudo omv-sfsnapadm -v cleanup -s ; echo "$?"


    And you will probably see this output:

    Code
    $ sudo omv-sfsnapadm -v cleanup -s ; echo "$?"
    Cleaning up snapshots from shared folders has been disabled.
    1


    To stop the emails from coming, you could enable the automatic snapshot cleanup option in the OMV GUI (which I'm guessing would have no side-effect if you're not running BTRFS or if you have no snapshots), you could disable /etc/cron.hourly/openmediavault-cleanup_sf_snapshots or edit its last line, or you could edit /usr/sbin/omv-sfsnapadm to exit with return code 0 if the setting is disabled. Note that these are all temporary workarounds, and each could have possible side-effects now or down the road.

    2 Mal editiert, zuletzt von zandive () aus folgendem Grund: Added more information

  • votdev

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!