I’m really struggling trying to setup a persistent storage service using rancher-nfs on DigitalOcean. I wish someone could help me understanding what I’m doing wrong.
- I attach a new volume to a host controlled by Rancher and I follow the easy configuration steps: format th drive with ext4, then create a mount point under
/mnt
, actually mount the volume, and finally change fstab so the volume will be mounted again after reboot. I can eventuallymount -v | grep /mnt/volume-fra1-01
and my volume is there, so far so good. - Back to Rancher UI I move to the right environment and install rancher nfs driver, using the ip of the host it’s attached to and using
/mnt/volume-fra1-01
as mount directory. Either leaving mount options blank, ot providingnfsvers=4,proto=udp
options doesn’t seem to make a difference. The stack gets installed and I can see rancher-nfs driver in the storage drivers view.
12/16/2016 10:24:27 PMtime="2016-12-16T21:24:27Z" level=info msg=Running
12/16/2016 10:24:27 PMtime="2016-12-16T21:24:27Z" level=info msg=Starting
12/16/2016 10:24:27 PMtime="2016-12-16T21:24:27Z" level=info msg="Running on host dev01.localdomain(1h2) with driver rancher-nfs(1sd4)"
12/16/2016 10:24:27 PMtime="2016-12-16T21:24:27Z" level=info msg="Starting plugin for rancher-nfs"
- I think now I can simply create a service and add a volume like
data:/var/www/html
specifingrancher-nfs
as the volume driver. However my container never activates, and back to the storage drivers page I can see thedata
volume next to my host, but in an inactive state and logging inside my host the mount point is empty.
I’m using Rancher server v1.2.1 but v1.2.0 has the same result. Any hints?