Error with nfs/cifs volume

I’m trying to migrate some containers to a new setup. Running into lots of problem, but in the meantime I want to get my device backups up and running.
When trying to deploy a container, I get the following error message.

Deployment error
failed to deploy a stack: Creating volume “resilio-sync-temp_config” with default driver Creating volume “resilio-sync-temp_downloads” with default driver Creating volume “resilio-sync-temp_sync” with default driver Creating resilio-sync-temp … e[1Ae[2K Creating resilio-sync-temp … e[31merrore[0m e[1B ERROR: for resilio-sync-temp Cannot start service resilio-sync-temp: error while mounting volume ‘/var/lib/docker/volumes/resilio-sync-temp_downloads/_data’: failed to mount local volume: mount :/Media/Backups/Resilio-temp:/var/lib/docker/volumes/resilio-sync-temp_downloads/_data, data: addr=172.16.101.100,nolock,soft: operation not permitted ERROR: for resilio-sync-temp Cannot start service resilio-sync-temp: error while mounting volume ‘/var/lib/docker/volumes/resilio-sync-temp_downloads/_data’: failed to mount local volume: mount :/Media/Backups/Resilio-temp:/var/lib/docker/volumes/resilio-sync-temp_downloads/_data, data: addr=172.16.101.100,nolock,soft: operation not permitted Encountered errors while bringing up the project. : exit status 1

My compose file is:

---
version: "3.2"
services:
  resilio-sync-temp:
    image: ghcr.io/linuxserver/resilio-sync:latest
    container_name: resilio-sync-temp
    environment:
      - PUID=1000
      - PGID=100
    volumes:
      - type: volume
        source: config
        target: /config
        volume: 
          nocopy: true
      - type: volume
        source: downloads
        target: /downloads
        volume: 
          nocopy: true
      - type: volume
        source: sync
        target: /sync
        volume: 
          nocopy: true

    ports:
      - 8888:8888
      - 55555:55555
    restart: unless-stopped
volumes:
  config:
    driver_opts:
      type: "nfs"
      o: "addr=172.16.101.100,nolock,soft,rw"
      device: ":/Config/resilio-temp"
  downloads:
    driver_opts:
      type: "nfs"
      o: "addr=172.16.101.100,nolock,soft,rw"
      device: ":/Media/Backups/Resilio-temp"      
  sync:
    driver_opts:
      type: "nfs"
      o: "addr=172.16.101.100,nolock,soft,rw"
      device: ":/Media"

Pieced this compose file together from a few sources. Original is the linuxserver compose, then found an example online of the nfs volume mounting. They were different compose versions, 2.1 for the original, and 3.2 for the NFS example.

Your volume declarations look okay-ish.

Have you tried to mount the nfs shrare using the mount command to see whether your host is generally able to mount the share with the provided options?

I would recommend nfs v4 over nfs v3, as it tends to be more reliable. Also, I am not sure if nolock and soft are really desirable options when working with containers.

This is in a Proxmox CT running Debian, but yes it works with the mount command inside the CT. Is that what you mean?

How do I specify v4? o: "nfsvers=4" ?
nolock and soft were recommended in a few places as a way to stop the Docker container having issues if the volume was unavailable I think. Looking it up now, it looks like soft may still be useful but nolock is for older NFS servers.
https://web.mit.edu/rhel-doc/5/RHEL-5-manual/Deployment_Guide-en-US/s1-nfs-client-config-options.html

So not sure why this isn’t working. Maybe I should try CIFS instead of NFS.

If it’s mountable from the cli, it should be mountable by a named volume backed by a remote nfs share.
I have my nfsv4 shares on a Synology NAS without any issues for years now.

I adapted one of your volume declarations to the configuration I use:

volume:
  config:
    driver_opts:
      type: nfs 
      o: addr=172.16.101.100,nfsvers=4
      device: :/Config/resilio-temp

Note: quoting the value is optional.
Note2: read write is the default, there is no need to add rw

You definitely don’t want to use nolock, some services require it to work, e.g. database do.
soft might make sense on a host, but I feel that it does not with a container. I am not using it.

The recommendation order for remote shares is: nfsv4, cifs. If possible avoid nfsv3 at all cost.