0
I am setting up a RancherOS VM on my FreeNAS server and I am having trouble setting up NFS shares. I have a .yml file that is able to set up one share mount but I would like to be able to set up two separate shares. In the configuration .yml file below, I tried adding a second line for nfs-2 under volumes and then the second location I wanted to share under environment (Share2). This results in an nfs-2 share being created but not accessible outside of ssh, so essentially I can view and add/delete directories with ssh but I don't know where the directory actually is and I can't access it with SMB. The nfs-1 share mount then accesses whichever share volume is the last line under environment. If there are directories in the nfs-1 share they are viewable in ssh and I can make and remove new directories.
rancher:
services:
nfs:
image: xxxxxxx/rancher-nfs-client
labels:
io.rancher.os.after: console, preload-user-images
io.rancher.os.scope: system
net: host
privileged: true
restart: always
volumes:
- /usr/bin/iptables:/sbin/iptables:ro
- /mnt/nfs-1:/mnt/nfs-1:shared
- /mnt/nfs-2:/mnt/nfs-2:shared
environment:
SERVER: 192.168.1.xxx
SHARE: /mnt/mntVolume/rancher
SHARE: /mnt/mntVolume/Share2
I also tried adding the SERVER line a second time before the second share which didn't change anything.
Basically, I am wondering if there is a way to edit the volumes and environment sections to be able to create one NFS share in the rancher storage pool for docker containers and config files and another in Share2 which is a storage pool of existing file share directories.
YML is not the same as YAML. The recommended extension for YAML files has been
.yaml
at least since Sep 2006. – Anthon – 2019-05-11T22:36:04.863