Accessing NFS Share

For anyone else struggling to get NFS shares to work, I finally found something that made a difference for me, and I’m posting it in case it helps someone else.
As background, I’m using Docker in swarm mode, with Traefik in front of Cells.

Based on this post I installed the NFS docker container. I still kept getting errors when I added the share, though:

Cross-device mounts detected on path (/home/media) at following locations [/home/media/nfs/video]. Export path should not have any sub-mounts, refusing to start. Invalid command line arguments

What I found was that I wasn’t defining the data source “deeply enough”. My docker volumes section looks like:

volumes:
  cells-static:
  cells-data:
  cells-nas-media:
    driver: nfs
    driver_opts:
      share: mynas:/raid0/data/_NAS_NFS_Exports_/files

services:
   cells:
    image: pydio/cells:latest
    volumes: 
      - cells-static:/root/.config/pydio/cells/static/pydio
      - cells-data:/root/.config/pydio/cells/data
      - cells-nas-media:/home/media/nfs/video
    [...]

My NAS share has a folder called /video containing files. This gives me a mounted path inside the container of
/home/media/nfs/video/video/file.mp4
the mount point -----^

Then, when I created the data source, I was entering a path of /home/media/nfs.
This continued to give me the same cross-device error.

Finally, I fixed this by going deeper in the data source setup by entering /home/media/nfs/video/video instead. This finally gives me what I’m expecting. The log started listing
Computing Etag for unknown file : x.mp4
My next step is to add a second volume not using the NFS driver, and use the same deep path, and see if it works.

Cheers,
Geoff

Hi, did you get this solved with either NFS or CIFS mounts?
Did you need to setup the volume in Docker/Portainer first or did you mount it directly in your Pydio compose/stack?

I’ve been researching for a few days and there are a few ways they say you can add a NFS/CIFS mount point to docker and then allow containers to see these mounts.

It seems adding it to docker allows you to use the same mount point across different containers, which seems ideal if you are looking to share similar data.

Hi @nmincone

Same answer as for Help with Persistent Install Data and NFS in Docker Swarm : please do not resurrect very old thread, rather make a new one and link to the old issue if necessary.

These questions are really prehistoric (came from v1/v2 that are not supported anymore since 3 years) and even if we do our best to preserve retro-compatibility, we would rather prefer that you do not bring some old deprecated configurations in the first few results of the forum :wink:

Thus said, now NFS works smoothly with Cells setups and we are using it both internally and for supported customers. (SMB works but is not yet fully officially supported as it uses some tweaks that are not really best practices).

Please refer to the documentation to get some up-to-date templates and explanations or open a new thread if you have some more questions or issues.