Unable to use rancher-nfs to mount remote nfs share to container

Hi everybody,

I’m trying to mount a remote nfs share hosted on a windows 2012 r2 server (servername:/test) to an ubuntu container using the rancher storage nfs-driver. This is my docker-compose configuration for the nfs-driver:

version: '2'
services:
  nfs-driver:
    privileged: true
    image: rancher/storage-nfs:v0.6.5
    environment:
      MOUNT_DIR: /test
      MOUNT_OPTS: vers=4.1
      NFS_SERVER: servername
    volumes:
    - /run:/run
    - /var/run:/var/run
    - /dev:/host/dev
    - /var/lib/rancher/volumes:/var/lib/rancher/volumes:shared
    logging:
      driver: json-file
      options:
        max-file: '2'
        max-size: 25m
    pid: host
    labels:
      io.rancher.container.agent.role: environment
      io.rancher.container.create_agent: 'true'
      io.rancher.scheduler.global: 'true'

I created the volume named testshare in Infrastructure->Storage and this is the ubuntu docker-compose config:

version: '2'
volumes:
  testshare:
    external: true
    driver: rancher-nfs
services:
  ubuntu:
    image: ubuntu:14.04.3
    stdin_open: true
    volumes:
    - testshare:/opt
    tty: true
    labels:
      io.rancher.container.pull_image: always

Unfortunately I’m getting the following error:

Activating (Expected state running but got error: Error response from daemon: create testshare: VolumeDriver.Create: Failed mount -o nfsvers=4 servername:/test /tmp/ywrdn: mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use ‘-o nolock’ to keep locks local, or start statd. mount.nfs: mounting servername:/test failed, reason given by server: No such file or directory)`

I managed to connect to the nfs-driver’s console and and manually mounted the nfs share without problems using this command:

mount -o vers=4.1 servername:/test /mnt

I used the option vers=4.1 beacuse with nfsvers=4 on a Windows NFS server won’t work at all as it supports only 4.1.

In addition, during the ubuntu container startup I have found the following error in rancheros syslog:

Apr 12 15:09:20 rancher rpc.statd[2874]: Version 1.2.8 starting
Apr 12 15:09:20 rancher rpc.statd[2874]: Flags: TI-RPC
Apr 12 15:09:20 rancher rpc.statd[2874]: failed to create RPC listeners, exiting
Apr 12 15:09:20 rancher rpc.statd[2903]: Version 1.2.8 starting
Apr 12 15:09:20 rancher rpc.statd[2903]: Flags: TI-RPC
Apr 12 15:09:20 rancher rpc.statd[2903]: failed to create RPC listeners, exiting
Apr 12 15:09:20 rancher rpc.statd[2932]: Version 1.2.8 starting
Apr 12 15:09:20 rancher rpc.statd[2932]: Flags: TI-RPC
Apr 12 15:09:20 rancher rpc.statd[2932]: failed to create RPC listeners, exiting
Apr 12 15:09:20 rancher rpc.statd[2961]: Version 1.2.8 starting
Apr 12 15:09:20 rancher rpc.statd[2961]: Flags: TI-RPC
Apr 12 15:09:20 rancher rpc.statd[2961]: failed to create RPC listeners, exiting
Apr 12 15:09:20 rancher rpc.statd[2990]: Version 1.2.8 starting
Apr 12 15:09:20 rancher rpc.statd[2990]: Flags: TI-RPC

Does anyone has a clue of what am I doing wrong?
Thanks in advance
E.

Did you manage to find a solution. We are facing similar issues when trying to mount a volume in windows from a windows container. We are getting error."invalid volume spec “/testdir”: invalid volume specification: ‘\testdir’ "
Where testdir is the directory we created.