Unable to mount NFS in docker.. again

Please I need your help because I am already loose an afternoon and a big part of my mental health.

Could you please tell where I am wrong?

I have 2 shared folder in NFS with the same permissions, one works the other no. Why?

It is me? It is truenas? It is docker?

When compose starts I have this error:

argos@argos:~/docker_data$ docker compose up -d
[+] Running 2/3
 ✔ Container portainer_agent  Running                                                                                                                                         0.0s 
 ✔ Container frigate          Running                                                                                                                                         0.0s 
 ⠦ Container jellyfin         Starting                                                                                                                                        0.7s 
Error response from daemon: error while mounting volume '/var/lib/docker/volumes/docker_data_musica_nfs/_data': failed to mount local volume: mount :/mnt/gaia/teti/musica:/var/lib/docker/volumes/docker_data_musica_nfs/_data, data: addr=,nolock,soft: permission denied

Here my compose file with the relevant parts:


      type: "nfs4"
      o: "addr=,nolock,soft,rw"
      device: ":/mnt/gaia/rea/jellyfin_data"

      type: "nfs4"
      o: "addr=,nolock,soft,rw"
      device: ":/mnt/gaia/teti/musica"


# -------------------------------------------------------
# domotica
# -------------------------------------------------------

    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped   
#    privileged: true
    user: 3003:3001
      - PUID=3003
      - PGID=3001
      - TZ=Europe/Rome
      - JELLYFIN_PublishedServerUrl= # autodiscovery su rete locale
      - jellyfin_config_nfs:/config
#      - libri_nfs:/data/books
      - musica_nfs:/data/music
      - 8096:8096 # UI porta HTTP
      - 8920:8920 # UI porta per HTTPS
      - 7359:7359/udp # porta autodiscovery
      - 1900:1900/udp # porta per DNLA

Are you able to connect to the nfs share on the host running your docker containers just to test?

Hello, no I can’t mount via terminal as well as create volumes using portainer or docker compose… I think it is a truenas scale fault, with core I had no issues…

Are you sure you have all the proper nfs tools installed on the host?

Yes I ve installed the nfs common, but I am using docker for the volumes so I don’t think it is needed

To me is truenas “scale” that sucks, “core” was rock solid.
With this (same settings and users I had on core) It is like it that the settings are shown correctly but not applied (I don’t know how to better explain it) and it also very slow (UI, etc) in comparison.

I added another volume (this time from my syno nas) and it works without issue, so it should be something on the “scale”

I am thinking to go back to core…


      type: "nfs4"
      o: "addr=,nolock,soft,rw"
      device: ":/volume3/sorveglianza"

      type: "nfs4"
      o: "addr=,nolock,soft,rw"
      device: ":/mnt/gaia/rea/docker/jellyfin"

I am posting it here, thank you @LTS_Tom

1 Like