Docker Volume Plugin - Updating/upgrading and --cache-dir

What is the question you are having with rclone?

The Docker Volume Plugin is a revelation, thanks for the work on this.

I am integrating it into my Docker environment but haven't been able to find answers to a couple of things in the docs or on the forums:

  1. Is there a recommended upgrade process for the Docker Volume Plugin. This is perhaps somewhat self explanatory based on the Docker docs (docker plugin upgrade | Docker Documentation) but wanted to add it into the post here so it will appear when people search the forums, and to see if there were any additional comments to add to the process. Presumably the container needs to be stopped, the plugin disabled and then upgraded before re-enabling the plugin and starting the volume again. Best I can tell there is no ability in Watchtower for auto-updates, looks like it will have to be a manual process.

  2. I am trying to use --cache-dir string with the Docker volume plugin (cache_dir: '/path/'). How does this cache_dir work in relation to the Docker Volume plugin? Does the provided path refer to inside the container, or on the host system? Is there an ability to specify? If inside the container, I am thinking this may be best to have the specified cache path mounted as a volume as it improves the I/O performance over having it in the Docker container layer?

This question is a bit of thinking out loud to brainstorm a process, volume plugins are new to me, would be great to hear any thoughts.

What is your rclone version (output from rclone version)

Docker Volume Mount

Which cloud storage system are you using? (eg Google Drive)

Google Drive

  1. the sequence is:
    0. plan carefully! upgrading is tedious!
    1. stop all containers and volumes using the plugin
    2. docker plugin disable rclone
    3. docker plugin upgrade rclone
    4. docker plugin enable rclone
    5. recreate volumes and restart containers
      (compose file(s) is your friend)
  2. you should not use --cache-dir with plugin.
    the plugin cache by default is located on host under /var/lib/docker-plugins/rclone/cache which is mentioned in docs Docker Volume Plugin

Most helpful, thanks.

The goal of using --cache-dir with the volume plugin was to be able to move the cache to a USB drive. I am running an rclone on a Raspberry Pi, and storing cache on the SD card would be a big ask because of the poor read/write speeds and it sharing with the OS.

It seems the volume plugin doesn't work with RPI right now anyway, so it was mostly hypothetical.

Thanks again.

Either mount /var/lib/docker-plugins/rclone/cache to external drive on the host or set docker plugin set rclone cache_dir=/mnt/path/to/flash/card

1 Like

and..... Docker Volume Plugin is your friend. have a look in :slight_smile:

Great docs, I had managed to use them yesterday to get up and running on a Ubuntu VPS.

Couple of things that were a little confusing, there is a separate section titled Installing as Managed Plugin from the Getting started guide, and it seemed for a while that they were different processes and I went down a bit of a rabbit hole trying to work out which was best. Seems the only difference in the docs is one is started as rclone/docker-volume-rclone and the other rclone/docker-volume-rclone:latest. Assuming plugins work like normal docker containers, the :latest is implicit and doesn't actually effect the setup.

Using the :latest which is what just by chance I ended up using, the volume plugin example for Google failed with an unrecognised driver. Instead it had to become:

volumes:
  configdata:
    driver: rclone:latest
    driver_opts:
      remote: 'gdrive:heimdall'
      allow_other: 'true'
      vfs_cache_mode: full
      poll_interval: 0

May be worth removing the :latest from the docs (assuming I'm right in that it doesn't do anything) to avoid people running in to the same issue.

May also be worth adding that it isn't compatible with RPI (arm). I think there are quite a few RPI docker users. I ended up tracking the issue back to this post: Error on install- can't enable plugin: rclone.sock no such file or directory · Issue #38 · sapk/docker-volume-rclone · GitHub

Will submit a pull request to the docs if my understanding is correct and it is felt there is some value in these changes:

Removing :latest from rclone plugin path
Changing Installing as Managed Plugin to Installing <-- is there an unmanaged option?
Maybe change Getting Started to Quickstart? Helps indicate why the Installing section is repeated.

yes, :latest is implicit in a docker image spec.

it can also be used with plugin aliases as the only allowed/default/implicit "version". it's just a harmless quirk of their alias parser and may vanish in future docker releases.

arm will be supported in v1.58

i'm not a native english speaker so i don't know if quickstart feels better than getting started. for me both represent an introductory guide with details to be elaborated in specialized doc sections.

1 Like

Pull request here: Update docker.md by maggie0002 · Pull Request #5618 · rclone/rclone · GitHub

I opted not to mention the Raspberry Pi thing, partly because as you mention it is coming soon, but also because it wasn't immediately clear how to explain it. It's more than just RPI, but all ARM architectures. Soon enough it won't be an issue anyway :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.