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
Touch not running after update to snapraid 12.3 #92
Labels
bug
Something isn't working
Comments
Hi, thank you for reporting. Still haven't updated to SnapRAID 12.3, so I didn't catch this. Thankfully I don't have to check for the Snapraid version, because it does not always work. I've done a quick fix and tested it locally. This code works by making I will make the commit and hopefully do a fix release soon (can't promise). TIMESTATUS=$($SNAPRAID_BIN -c $SNAPRAID_CONF status | grep -E 'You have [1-9][0-9]* files with( a)? zero sub-second timestamp\.' | sed 's/^You have/Found/g') |
auanasgheps
added a commit
that referenced
this issue
Apr 8, 2024
SnapRAID 12.3 has changed the string of the diff ouput, causing the script not to catch it. Now it works in both cases. #92
Your quick fix is working, thanks! |
tehniemer
added a commit
to tehniemer/snapraid-aio-script
that referenced
this issue
Apr 12, 2024
* Update script-config.sh No more dev tag * Update snapraid-aio-script.sh URL to be checked is in master branch No more dev tags * Improve documentation of SYNC_WARN_THRESHOLD Fixes auanasgheps#89 Better explain what SYNC_WARN_THRESHOLD does, including Forced Sync option. This explanation was pretty old, in fact was never updated since I started working on the script. * Update README.md Small tweaks * Fix touch not running on SnapRAID 12.3 SnapRAID 12.3 has changed the string of the diff ouput, causing the script not to catch it. Now it works in both cases. auanasgheps#92 * Update snapraid-aio-script.sh * Install curl if check_updates is enabled Check and install curl dependency if "CHECK_UPDATES" is enabled. auanasgheps#93 * Update version Update for 3.3.1 * Update script version Update version to 3.3.1 * Add Star History * Update index --------- Co-authored-by: Oliver Cervera <cervera93-19@yahoo.it>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since I updated to snapraid 12.3 I noticed an increasing number of files with a zero sub-second timestamp in the snapraid status part of my mail notification.
It was strange since the snapraid touch part of this script should correct these files on the next run.
It did not.
The reason is a small change in the output of the command "snapraid status" in snapraid 12.3.
From (before snapraid 12.3): You have %u files with zero sub-second timestamp.
https://github.com/amadvance/snapraid/blob/986e16b4e87437eb2d7a018a2dd714be44db7f04/cmdline/status.c#L483
To (since snapraid 12.3): You have %u files with a zero sub-second timestamp.
https://github.com/amadvance/snapraid/blob/cd327c60c79b24e09f6a362c0d22fc3a2c7aebed/cmdline/status.c#L475
Because of this change:
snapraid-aio-script/snapraid-aio-script.sh
Line 567 in ecbaa73
grep does not get the correct output because of the missing "a".
TIMESTATUS is empty.
"No zero sub-second timestamp files found."
Touch does not run, the number of files with a zero sub-second timestamp increases indefinitely.
Quick fix for anyone using snapraid 12.3, change the following line from:
TIMESTATUS=$($SNAPRAID_BIN -c $SNAPRAID_CONF status | grep 'You have [1-9][0-9]* files with zero sub-second timestamp\.' | sed 's/^You have/Found/g')
to:
TIMESTATUS=$($SNAPRAID_BIN -c $SNAPRAID_CONF status | grep 'You have [1-9][0-9]* files with a zero sub-second timestamp\.' | sed 's/^You have/Found/g')
In order to maintain compatibility with old snapraid versions, it should be possible to add a version query before the actual query to avoid errors.
The text was updated successfully, but these errors were encountered: