Any docs for union?

Is there any guide or docs for union? The official docs are very unclear and are missing a lot of information. No clue what those policies mean. How can I mount a union remote? Can I mount it with systemd just like mergerfs? Can the same options be used like "vfs cache mode" and "buffer size" for example. I don't understand what the cache time does. Just one sentence doesn't cover it. What is path preserving polices?

Any guide or anything to get me started would be greatly appreciated.

same as any remote. rclone mount remote: /path/to/mountdir

yes, this is a good template https://github.com/animosity22/homescripts/blob/master/systemd/rclone-drive.service

yes

are two rclone caches, here is a summary i wrote up
https://forum.rclone.org/t/status-about-using-rclone-for-music-storage-playback-in-2021-access-times-improved/27648/34

Okay thank you very much. What do I set as upstream? Is it the remote followed by mount folder??

i do not use union remotes

yes, as per the example i shared.

Explain what you want to achieve, and I'll have a go at making a configuration with you.

I want to mount my google drive rclone crypt remote with union.

There's no reason to use a union for mounting a single drive.

Just mount the single remote.

Okay. With mergerfs? I thought union was a replacement of mergerfs?

I'm not sure why you'd use mergerfs or union for mounting a single item. A union or mergerfs is generally for using more than one remote/mount to combine them based on a policy.

So what are you trying to do is the question? If it is

There's no reason to use union or mergerfs as it's a single remote. Just mount it.

I have been running rclone with mergerfs before so I can write files to a local folder and access the cloud files in the same folder. What approach would you recommend then?

Share your mergerfs setup if you'd like to replace it with union as that is what @ncw is asking for.

I'd just use mergerfs but you can choose what you'd like.

The problem is, Before I mounted the rclone mergerfs on top of a zfs pool with a different linux distro. Now I have 2 ssd's merged with mergerfs and on top of that I would like to mount the rclone mount. If I do that I cannot access my folder with a different user than root.

If you share what you are doing / commands / configuration, we can help.

I can't help if you just tell me it's broken without specifics.

Okay I will. At work right now. Will do tonight.

Okay here we go.

These are the mount options I am using for the two ssd's merged together:

/srv/dev-disk-by-uuid-2dfbcba7-0867-4309-823c-fa914e790156:/srv/dev-disk-by-uuid-47cfc98d-01ab-4fcb-b219-87ebfbbfc2d2  /srv/mergerfs/pool       fuse.mergerfs   category.create=epmfs,minfreespace=4G,fsname=pool:4faaf8e9-fae7-49d3-9313-f7ac88c2349f,defaults,allow_other,use_ino,cache.files=partial,dropcacheonclose=true,x-systemd.requires=/srv/dev-disk-by-uuid-2dfbcba7-0867-4309-823c-fa914e790156,x-systemd.requires=/srv/dev-disk-by-uuid-47cfc98d-01ab-4fcb-b219-87ebfbbfc2d2      0 0

This is my one of my systemd's:

[Unit]
Description=Gmedia RClone Mount Service
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount \
  --config=/root/.config/rclone/rclone.conf \
  --log-level=INFO \
  --log-file=/srv/mergerfs/pool/config/rclone/logs/rclone-mount.log \
  --user-agent=shawn \
  --umask=007 \
  --gid=100 \
  --uid=1000 \
  --allow-other \
  --timeout=1h \
  --poll-interval=15s \
  --tpslimit 10 \
  --buffer-size=512M \
  --dir-cache-time=1000h \
  --cache-dir=/srv/mergerfs/pool/config/rclone/cache/gmedia \
  --vfs-cache-mode=full \
  --vfs-cache-max-size=150G \
  --vfs-cache-max-age=1000h \
  --use-mmap \
  --vfs-fast-fingerprint \
  gdrive-media-crypt: /srv/mergerfs/pool/gmedia-cloud
ExecStop=/bin/fusermount -uz /srv/mergerfs/pool/gmedia-cloud
Restart=on-abort
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

And this is the other one:

[Unit]
Description=Gmedia MergerFS Mount
Requires=gmedia.service
After=gmedia.service

[Service]
Type=forking
ExecStart=/usr/bin/mergerfs /srv/mergerfs/pool/gmedia-local:/srv/mergerfs/pool/gmedia-cloud /srv/mergerfs/pool/gmedia -o rw,nonempty,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,dropcacheonclose=true
ExecStop=/bin/fusermount -uz /srv/mergerfs/pool/gmedia
KillMode=none
Restart=on-failure

[Install]
WantedBy=multi-user.target

I am running docker containers like plex with user 1000 and group 100. Just like the rclone mount. But for some reason I can't access the folder from inside plex.

Then we'd have to see your docker configuration there as if you can't see it from inside the docker, the docker setup is the next issue.

plex:
    image: linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=100
      - VERSION=public
    volumes:
      - /config/plex:/config
      - /data:/data
      - /transcode:/config
    restart: unless-stopped

/config and /data are symlinks

Doesn't seem you have the other mounts visible to the docker as I don't see

in the docker setup.

My plex docker is setup to access my rclone mounts:

  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    devices:
     - /dev/dri:/dev/dri
    privileged: true
    environment:
      - PUID=1000
      - PGID=1000
      - VERSION=docker
      - TZ=America/New_York
    volumes:
      - /opt/docker/data/plex:/config
      - /media/Movies:/media/Movies
      - /media/TV:/media/TV
    restart: unless-stopped

/srv/mergerfs/pool/gmedia is the same as /data it's a symlink