I am trying to setup a virtual machine structure with a data storage on the host machine. I have 3 virtual machines. All of them, including the host, are running ubuntu 16.04 server.
So what I want to achieve is a shared filesystem between the VM, and still be able to shut down a single VM for maintenance without loosing file access from another VM.
So I came up with using the host as shared storage. Users should also have sftp access to that storage without ever accessing the VM directly.
So what I can't figure out is, how to mount the shared folder to the VM.?
I have been playing around with fstab and nfs4, but I have to admit, I am not that familiar with all of this right now.
And is it possible to always set the file permissions and ownership to www-data within the VM, no matter who crated the file on the host?