Order of preference on union mount for reading-only case

What is the problem you are having with rclone?

I have in my crypted OpenDrive remote a structure similar to this:

a/
├─ b/
├─ c/

I would like to use the union remote only for readonly, so I can have locally a partial mirror of the contents of a.
The contents of c are synced overnight from another folder in my local filesystem with the exact same name so, unless there was an error syncing or I modified the contents of the local filesystem copy during the day, both are equals 99% of the time.

b in this case will have the majority of the content on the crypted remote, but I might add some files temporarily to the local filesystem folder so I can make use of them before I have them uploaded to the remote. Once they are uploaded, they will be removed from the local filesystem and only the remote copy will exist.

The case of b it's easy to understand (when the file exists locally it doesn't exist remotely, and when it exists remotely, it doesn't exist locally, so union simply "switches" between the both when merging. However, the handling of c it's not 100% clear to me.

The docs explain mostly a write/modification scenario (writeback section)

How I can ensure that the local filesystem is always given priority against the crypted remote one when they are exactly the same? I have some assumptions:

  • I should use as search_policy ff or epff
  • The upstreams are queried sequentially or parallel? If they are queried sequentially, defining first the local filesystem might help because it's the first one queried. Or perhaps its vice-versa, and the latter takes precedence over the former?

Copy command seems to run at local speeds, but ncdu or lsf --recursive takes some time to run (instead of listing the files that are locally rightaway, it seems to wait for the remote and then start listing with the normal OpenDrive's speeds, not local ones.

Can you clarify me what's the best settings to approach what I want to do? Are my settings/assumptions correct?

Config

[Merged]
type = union
search_policy = epall
upstreams = /mnt/disk/media:ro UnlimitedCrypt:Media:ro
description = Merges the local filesystem files with the online ones

Run the command 'rclone version' and share the full output of the command.

rclone v1.69.3
- os/version: debian 12.11 (64 bit)
- os/kernel: 6.1.0-37-arm64 (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.24.3
- go/linking: static
- go/tags: none

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

Local filesystem and crypt wrapped OpenDrive

Wouldn't it indicate that all works exactly as you intended? Obviously when running ncdu or lsf --recursive both upstreams have to be fully listed.