Closed jxer closed 8 years ago
I think that issue is related to #430 . Don't need to unmount, just run:
rm -f /root/.cache/acd_cli/nodes.db
acd_cli sync
I started doing this after every upload.
If you have lots of files removing the db is really bad advice nowadays. Full sync does not finish and people had to do incremental sync (the normal sync, without clearing the db) multiple times (sometimes taking many days) to get to get it to sync completely.
Also I'm not sure (really, I might be wrong!) but are you supposed to run sync while you have acd fuse-mounted?
i have learned that if you drop the mount before doing the sync then remounting, the issue is not there, but this is a major problem as programs depending on these mounts need to go offline before syncing. thus its an outage every time you need to sync
@jxer why do you need to sync while the folder is mounted?
@jxer Probably to get the latest list of files on ACD. :smile:
But yea, the best way to do it is to either have a script unmount the acd mount, sync and then remount. Another option is to have a cronjob setup to sync every so often and another script that runs every minute and checks to see if the mount is ok. Once the sync script fires it will either work ok or cause the fuse mount to freak out. The second script will then try to remount the share if it notices it is not correctly mounted.
I've found it, it's in the documentation: http://acd-cli.readthedocs.io/en/latest/FUSE.html
_Using acdcli’s CLI commands (e.g. upload or sync) while having the drive mounted may lead to errors or corruption of the node cache.
@EldonMcGuinness Or you could simply run acdcli cc to clear the cache. Then sync. Fixed it for me.
@El-Fitz you don't crash at all if you run acdcli cc before the sync? your mount stays up the entire time?
well i tried to run the acdcli cc command while mounted and 3 times in a row it blew up the mount so much for that
cc (clear-cache) nukes completely the db, of course it will create problems with the mount (as mentioned in the documentation even a simple incremental sync will create problems, which updates only some nodes, what do you think removing all and starting from scratch would do?).
Additionally your apps that need the ACD mounted will have major I/O issues even if the mount wouldn't crash, it would be just like you're having serious disk issues: files will disappear and reappear, you would write a file and the file won't be there some time after (or the write would fail completely), etc.
@vb0 @El-Fitz I could have sworn I tried the cc option and it did not kill a corrupted DB, though I could be wrong. I will try to change my script to use it and see what happens. Cheers!
@vb0 @jxer @EldonMcGuinness Personnaly, I try to sync. If it doesn't work, I cc then sync again. And it solves most of my problems. But I'm just using it for Plex, so I guess I'm not really concerned by the second issue that @vb0 mentioned.
drop the mount and sync, works every time
Is there a way to use a script that does all this automatically? It would appear to me that these issues give the same errors and an intelligent script could fix it on the fly.
randomly i keep dropping the acd mount, it generally happens after a acdcli sync, i have to drop the fusermount and remount, sometimes its so bad i need to delete the node db, then have to mount and unmount twice.
i am using encfs on top of the acd mount???