Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for waiting for other processes #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

exterrestris
Copy link
Contributor

Detect lock files from other processes that are/may be modifying the data disks and wait for them to be removed before continuing with the diff/sync.

I use StableBit Drivepool to pool my data disks, and have a landing zone to help prevent writes to the data disks while a sync is underway (and for protection against disk failure). This is configured to 'rebalance' onto the main data disks daily before the scheduled sync, with a file created to indicate that a balance is in progress - using the functionality added in this PR, I can get the script to pause until the balance has completed. As another example, it could also be used to wait for a long-running backup to complete.

Detect lock files from other processes that are/may be modifying the data disks and wait for them to be removed before continuing with the diff/sync
Fixed bug where script would wait for last defined file even if it didn't exist
@Chronial
Copy link
Owner

What is the advantage of having this functionality in snapraid-runner compared to having a wrapper-script?

@exterrestris
Copy link
Contributor Author

Primarily, the benefit is that it ties into the same logging and email functionality and configuration, which avoids the need to duplicate that functionality and configuration. It also makes it's clear as to what happens during a run - whether it is aborted completely, or merely delayed, together with with the cause.
Besides snapraid-runner is itself a wrapper script - creating yet another wrapper around it feels unnecessary.

@Chronial Chronial added the out-of-scope This feature is of scope for the (narrow) goals of snapraid-runner label Oct 31, 2021
@Chronial
Copy link
Owner

Would #50 address your use-case?

@exterrestris
Copy link
Contributor Author

Apologies for taking so long to reply. Since creating this PR I've switched my home server from Windows to Linux, and changed the structure of my disks such that this is no longer really an issue for me. Having said that, #50 would still be a useful addition for me for other reasons - for this use case, as long as the 'pre-hook' could abort the sync then yes it would address it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
out-of-scope This feature is of scope for the (narrow) goals of snapraid-runner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants