Accessing remote storage (NFS, CIFS)

Hello,

I just get started with IncusOS so maybe I‘m missing something obvious. I try to access an existing file share from a container. With incus as a service I would mount the path into the container and be done with it. However with IncusOS I can‘t do that as I‘m unable to access the file system. Don‘t get me wrong - it should stay that way. I just look for a way to add an nfs or smb share as a storage volume to attach it to a container. Is this implemented yet?

You may give this project a try GitHub - sahlberg/fuse-nfs: A FUSE module for NFSv3/4 until there is full NFS support in Incus. For CIFS you could try GVfs to mount your share.

NFS for Incus is worked on but it requires some more time until it makes it into the stable release.

Thank you. The FUSE fs unfortunately isn‘t working here as I‘m using an OCI container. Though for lxc it would be ok for now.

An alternative would be to add native SMB and NFS support in Incus as part of the source config for disk devices. We already have support for cephfs done that way, so it would probably be acceptable to extend the concept.

It would be great to get this feature, to get the full functionality of incus to IncusOS. Have you already added this to the roadmap?

Not yet as we’ve ran into quite a few issues when doing a first pass on some of the NFS stuff which makes it very hard to use the resulting share inside the container.

Hallo ! :waving_hand:
Is there anything we can do to help making this happen ? This would be a HUGE plus :slight_smile:

It will take time. For proper support, we’ll need kernel work… For initial support, using a custom FUSE driver may do the trick, but it’s not going to be fun for packagers…

Thanks as usual @stgraber
What would be the recommended way to go around this to have a container access to an NFS share ?

Use a FUSE NFS client from inside the container.

What would be your recommandation of having a container only for NFS client and other containers could use this NFS connection ?

I know this topic has been marked as solved, but I’m facing the same problem, and the provided solution doesn’t really address my use case because it cannot be applied to OCI containers.

I would like to access remote VM shares (CIFS/NFS) from an OCI container, with both the container and the VM running on the same IncusOS host. I understand the concerns regarding NFS support, but what about CIFS/SMB? Could CIFS/SMB support be added to IncusOS, at least as an optional application?

This is currently the only missing piece preventing me from using IncusOS. I like the idea of having an immutable OS, but in this case it means losing access to an important feature.