So I’m trying to use rancher-nfs to mount my NFS shares for persistent storage.
If I use rancher-nfs without any MOUNT_OPTS and leave it with just the nfsvers=4 option it will create a volume and also create a folder within my nfs share after starting the service, so it seems that the driver has access.
But the container still fails with “Error response from daemon: chown /var/lib/rancher/volumes/rancher-nfs/home-assistant: invalid argument”.
I’ve read that I need the parameter no_root_squash to get this working. But when I add no_root_squash to the rancher-nfs containers MOUNT_OPTS, I’ll get an error like “VolumeDriver.Create: Failed mount -o nfsvers=4 192.168.1.3:/mnt/storage/docker/home-assistant /tmp/eca4”
On my FreeNAS I’ve tried using mapall to root:wheel and I’ve also tried to use maproot root:wheel, which didn’t make a difference, even though mapall to root should work like no_root_squash. I’ve also enabled NFSv4 within FreeNAS.
Mounting the share directly within the host works fine, so why doesn’t it work? Is it because of FreeNAS or because of my configuration? I’m using RancherOS 1.0.2 and rancher/server:stable (I’m new to all this so I guess stable is version 1.6.2?)
[details=Here is the docker-compose.yml for the Stack I wanna create]version: "2"
volumes:
home-assistant:
external: true
driver: rancher-nfs
services:
home-assistant:
image: homeassistant/home-assistant
network_mode: "host"
restart: unless-stopped
volumes:
- home-assistant:/config
- /etc/localtime:/etc/localtime:ro[/details]