Help on getting NFS working - it seems impossible

I’ve installed NFS 0.30 (last version) stack using catalog.
The options are:

MOUNT_DIR		/	
MOUNT_OPTS		proto=tcp,port=2049,nfsvers=4	
NFS_SERVER		xxx.xxx.xxx.xxx (digitalocean droplet public ip)

The container starts normally and seems to be working fine.
So, then I try to create a simple stack using the NFS with this docker-compose:

version: '2'
services:
  web:
    image: nginx
    volumes:
    - bar:/var/bar

volumes:
  bar:
    driver: rancher-nfs
```

And I get this error:

```(Expected state running but got error: Error response from daemon: create aaaa_bar_8fa9a: VolumeDriver.Create: Failed nsenter -t 11437 -n mount -o proto=tcp,port=2049,nfsvers=4 xx.xx.xx.xx:/ /tmp/5ht8d)```

<img src="//discourse-cloud-file-uploads.s3.dualstack.us-west-2.amazonaws.com/business7/uploads/suse/original/2X/9/96f1a82333948a6ed1eccea76b21f2641623651c.png" width="690" height="86">

Any idea on this?

The top part is copied from the docker-compose.yml? Best way to troubleshoot is to look in the nfs-driver container logs, and if you can’t find anything useful, run it with RANCHER_DEBUG: 'true'

Hi,

Even I am facing same issues.
My nfs logs says
Failed to mount jenkinsdata: Failed nsenter -t 48144 -n mount -o ,nfsvers=4 10.xx.xxx.xxx://jenkinsdata /var/lib/rancher/volumes/rancher-nfs/jenkinsdata

Any idea whats going wrong here.

I got it working. The issue was while creating nfs catalog, I had given “/” for export base directory and in the server I had given /nfs.