Open philipp-spiess opened 7 years ago
Hi,
did you export ACD_CLI_CACHE_PATH and ACD_CLI_SETTINGS_PATH in the script or are you using the default? If you get a bad address that's usually going together with a bad cache...
I've seen it quite offen so my script looks something along those lines:
export ACD_CLI_CACHE_PATH=/wherever export ACD_CLI_SETTINGS_PATH=/wherever acdcli cc acdcli sync acdcli psync / acdcli mount ....
The psync is needed because the root node cannot be found after a full sync.
Cu
@Grimeton Thank you for your input I can try putting those env vars to both the fstab script and the upload script. Just a quick question, is the cache path the same as the settings path? So point both to/home/user/.cache/acd_cli
? :)
@philipp-spiess you can use the same path for both. Not a problem. I tend to create a subfolder per mount like:
Mount point /mnt/foo Acdcli path: /mnt/.foo
Pro tip: put the acdcli path on a RAM disk (tmpfs) and see an extreme speed up. (/run looks promising).
And there's an error in my previous post. It should be
acdcli sync --full
Instead of
acdcli sync
And sorry for the weird formatting... sent from my phone.
Cu
@Grimeton your environment variable trick did not work unfortunately. The same behaviour still occurs.
Then you're doing something wrong.
What OS? BSD? Linux? How does the fstab entry look like?
this is my fstab entry:
acdmount /mnt/amazon fuse _netdev 0 0
And a sniplet from my acdmount:
#!/bin/bash
export ACD_CLI_CACHE_PATH="/dev/null"
export ACD_CLI_SETTINGS_PATH="/dev/null"
mount_options="";
sync_options="";
clear_cache=0;
# other mount points
if [[ ...]; then
elif [[ "$1" =~ /mnt/amazon* ]]; then
[[ -d /run/acdcli ]] || mkdir /run/acdcli || exit 1;
[[ -d /run/acdcli/amazon ]] || mkdir /run/acdcli/amazon || exit 2;
for i in /run/acdcli/amazon/*; do rm "$i"; done
cp -r /mnt/.amazon/* /run/acdcli/amazon/ || exit 3;
export ACD_CLI_CACHE_PATH=/run/acdcli/amazon/
export ACD_CLI_SETTINGS_PATH=/run/acdcli/amazon/
mount_options="-ao --uid 112 "$1""
clear_cache=1;
sync_options="psync /"
else
exit 1;
fi
if [[ $clear_cache -gt 0 ]]; then
/usr/local/bin/acdcli cc
/usr/local/bin/acdcli sync --full
fi
/usr/local/bin/acdcli $sync_options
/usr/local/bin/acdcli mount $mount_options
And inside /mnt/.amazon/ I keep the files needed on the tmpfs located folder in /run that I copy over at mount. It looks like this:
root@x:/mnt/.amazon# ls
acd_client.ini acd_cli.ini cache.ini endpoint_data fuse.ini oauth_data
root@x:/mnt/.amazon#
And the ini files:
# for i in *.ini; do echo -e "$i\n"; cat $i; done
acd_client.ini
[endpoints]
filename = endpoint_data
validity_duration = 86400
chunk_retries = 3
connection_timeout = 60
idle_timeout = 120
acd_cli.ini
[download]
keep_corrupt = False
keep_incomplete = True
timeout_wait = 5
cache.ini
[sqlite]
filename = nodes.db
busy_timeout = 3000
journal_mode = wal
fuse.ini
[read]
open_chunk_limit = 20
timeout = 10
[write]
buffer_size = 64
timeout = 60
Is there anyting in your demsg, syslog or another debugging or anything else log?
Any messages in the acd_cli.log?
Cu
I experience hangs when mounting the FUSE drive through /etc/fstab. I tried the exact same arguments in a regular shell in the foreground and all works perfectly. Here's what I do:
When I do the same via an
/etc/fstab
config, the mount will start to hang at some point and will requirefusermount -u
to free it again.After hanging, accessing the file system looks like this:
This happens when I run a separate upload script over-night that uses
acd_cli upload
. I access the FUSE drive in this script to find out if the file is already uploaded or not.Here are the interesting lines (from `acdcli.acd_fuse`) in the log file
Edit: My upload scripts uses
acd_cli resolve
to see if the file exists andencfsctl decode
to get the prettier filename since the data there is encoded using encfs. The latter probably callsls
on/Folder
so that's why the log is full with that and that's why my script errors with something like this: