Hello,
I’m using rancher-nfs in an environment (it works). Now I’d like to start a second instance of rancher-nfs to access a second NFS storage for certain service.
Is this supposed to be possible at all?
What I’ve tried so far is to export the stack, change the name of the storage driver and start the stack as “nfs2” using rancher-cli:
services:
nfs-driver:
privileged: true
image: rancher/storage-nfs:v0.6.5
environment:
MOUNT_DIR: /nfs2
MOUNT_OPTS: ',nfsvers=4'
NFS_SERVER: 192.168.1.200
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'
services:
nfs-driver:
storage_driver:
name: rancher-nfs-2
scope: environment
volumeAccessMode: multiHostRW
start_on_create: true
The stack starts, but trying to use it fails:
Removing bad service instance: Error response from daemon: create iljatest: create iljatest: Error looking up volume plugin rancher-nfs-2: legacy plugin: plugin not found
And indeed, as far as I can see, a storage driver with my expected name “rancher-nfs-2” is never started on the rancher agents.
Should this work at all? Or is there another way to start the driver?