lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.63k stars 218 forks source link

Add a `nfs` storage driver #1311

Open stgraber opened 2 days ago

stgraber commented 2 days ago

nfs would be a small shim storage driver on top of our dir driver that would handle mounting the NFS share as needed on all servers within the cluster.

This should be restricted to only custom volumes and only filesystem type volumes for those as storing block/loop files on top of NFS seems like a bad idea and most NFS servers aren't quite POSIX enough to properly handle full containers (locking is always a bit weird).

vivekkoya commented 2 days ago

Hello, I can try this task. Can you please direct me to the relevant directories and files? Thanks

stgraber commented 1 day ago

The relevant files are in internal/server/storage/drivers/.

We did something similar to that with the lvmcluster driver which is just a tiny shim around the lvm driver.

In the case of nfs we should do something a bit more complete, so it should get its own file and own struct, but that struct should inherit from the dir struct and just override behavior where needed.