You are not logged in.
I just think with initscripts you could add a test for asd sync before shutdown just to make sure everything is ok, with systemd I am a little more in the dark. Maybe asd could log any output so we could check it syncs ok prior to shutdown...
Mr Green
Offline
@mrg - you can add a logging step yourself if you're volunteering to test... use this patch which should work but I have not tested.
--- anything-sync-daemon 2012-09-20 11:23:27.363527867 -0400
+++ anything-sync-daemon 2012-09-20 11:29:53.350443701 -0400
@@ -71,11 +71,12 @@
fi
# sync the tmpfs targets to the disc
+ LOG=/home/YOURUSER/asd.log
if [[ -e $LINK/.flagged ]]; then
- su -c "rsync -a --delete --exclude .flagged '$LINK/' '$BACKUP/'" $USER
+ su -c "rsync -av --delete --exclude .flagged '$LINK/' '$BACKUP/' >>$LOG" $USER
else
- su -c "rsync -a '$BACKUP/' '$LINK/'" $USER
- su -c "touch '$LINK/.flagged'" $USER
+ su -c "rsync -a '$BACKUP/' '$LINK/' >>$LOG" $USER
+ su -c "touch '$LINK/.flagged' >>$LOG" $USER
fi
fi
done
Note that you MUST define a username in the patch or in /usr/bin/anything-sync-deamon so that the log file goes somewhere.
LOG=/home/YOURUSER
# patch -i logging.patch /usr/bin/anything-sync-daemon
Last edited by graysky (2012-09-22 12:31:24)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I will test it of course, just need a safe directory to sync to ram that is safe presume /var/log is still out of bounds...
Mr Green
Offline
I will test it of course, just need a safe directory to sync to ram that is safe presume /var/log is still out of bounds...
Yeah, use a guinea pig directory for sure. Do populate it w/ a good chunk of data. Maybe 200 MB or so?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Ok on it.... Some justin bieber might do the trick
Mr Green
Offline
Ok on it.... Some justin bieber might do the trick
I said guinea pig, not garbage dump
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Not had any problems yet, checked to make sure service was running and found this
asd.service loaded active exited
Mr Green
Offline
Dunno for sure but that seems normal. Just look to see that your target is symlinked. If it is then it's active. Also, what does the log say?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
No log nothing naa daa....
Mr Green
Offline
Ack... forgot to specify a log file. Edited the patch. All you need to do is add "/asd.log" to the LOG=line in /usr/bin/anything-sync-daemon like this:
LOG=/home/YOURUSER/asd.log
Last edited by graysky (2012-09-22 12:32:00)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Thought it looked odd added asd.log
Mr Green
Offline
Cool, plz report back your findings with regard to systemd waiting for a sync.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
At the moment asd.log is empty really need to test it on an active directory....
Mr Green
Offline
Ok .... what I have this morning
sending incremental file list
./
sent 29 bytes received 15 bytes 88.00 bytes/sec
total size is 0 speedup is 0.00
sending incremental file list
./
sent 29 bytes received 15 bytes 88.00 bytes/sec
total size is 0 speedup is 0.00
Mr Green
Offline
Quick question, what is happening if a power failure happens during the rsync? Will my data get corrupted?
Did you consider using the "--delay-updates" rsync option (not sure if it is enough to have a real atomic operation)?
Cedric Girard
Offline
@Xd - Not sure. One could ask the same question for a standard write operation to a HDD as well. I do like your suggestion to add the --delay-updates switch which should make it a safer operation. I will test and implement.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
v3.07 is released with this suggestion. Thank you.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Won't "--delay-updates" actually write to the disk twice though? Or have I got this wrong?
Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64
Offline
Won't "--delay-updates" actually write to the disk twice though? Or have I got this wrong?
No, it just rotates the files from the temp names to the actual names. You can verify this with:
# iotop -Pao
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Ah, ok, thanks for clarifying. That actually makes a lot more sense. Thanks for all your work, really enjoying your packages
Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64
Offline
v3.07 is released with this suggestion. Thank you.
Thanks.
Cedric Girard
Offline
Can I use anything-sync-daemon for mysql?
In my development pc I decided to add lots of ram, to use it for local web development.
Everything mysql-related is under /srv/mysql, if I could put the databases in ram my dev-environment would fly!
Is there anything I should check? Will it sync back to the file-system on shutdown?
I'm under systemd, so the order the services start isn't configured by me.
Offline
Can I use anything-sync-daemon for mysql?
In my development pc I decided to add lots of ram, to use it for local web development.
Everything mysql-related is under /srv/mysql, if I could put the databases in ram my dev-environment would fly!Is there anything I should check? Will it sync back to the file-system on shutdown?
I'm under systemd, so the order the services start isn't configured by me.
I don't see why it wouldn't work. Backup your databases before attempting would be good advice. Plz report back. And yes, it syncs back on shutdown and once per hour. See the wiki page for more (or the man page).
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Amazing job at anything-sync-daemon and profile-sync-daemon, it works like a charm on my system! However, wouldn't deleting a file off a "RAM-cached" disk re-spawn after reboot (because of rsync and _backup folders)? Is there a solution to this other than deleting the files at both places?
EDIT: Removed a stupid question I figured out after hitting "post"
Last edited by ndejay (2012-11-01 01:13:30)
Offline
I'm confused... The daemon effectively makes your system have a single location. If you delete something from tmpfs, so long as you stop the daemon gracefully, the changes are committed to disk.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline