Hi,
I have configured rclone to mount google drive to a local folder in my Ubuntu 16 server with systemd and some docker containers pointing to that folder as a bind volume. The problem is that sometimes the mount gets dropped and put back up but the containers are not able to see it anymore.
If I attach into a container and try to enter the mount I get ls: cannot access 'cloud': Transport endpoint is not connected
but outside the containers the mount is working.
How could I force Docker to refresh the volume if the mount gets dropped?
My unit file:
[Unit]
Description=rclone Service
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/**USERNAME**/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount gdcrypt: /home/**USERNAME**/mediabox/gd \
--config=/home/**USERNAME**/.config/rclone/rclone.conf \
--allow-other \
--buffer-size 1G \
--dir-cache-time 96h \
--log-level INFO \
--log-file /home/**USERNAME**/logs/rclone.log \
--umask 002 \
--user-agent rcloneapp \
--fast-list \
--drive-chunk-size 64M \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit off \
--vfs-cache-mode writes
ExecStop=/bin/fusermount -uz /home/**USERNAME**/mediabox/gd
Restart=always
RestartSec=1s
User=**USERNAME**
Group=**USERNAME**
[Install]
WantedBy=multi-user.target
My rclone.conf
:
[gd]
type = drive
scope = drive
token =
client_id =
client_secret =
[gdcrypt]
type = crypt
remote = gd:crypt
filename_encryption = standard
directory_name_encryption = true
password =
password2 =
One of the container pointing to the mount:
mediabox-sonarr:
image: linuxserver/sonarr
environment:
- ...
volumes:
- /home/**USERNAME**/mediabox/gd:/cloud
- ...
ports:
- ...