LXD Host w/ remote NFS/iSCSI Storage

Hello

I have remote ZFS Storage Server that works as NFS Server and/or iSCSI Target. Can LXD Host use that remote storage server?
I would like to keep LXD containers on that remote shared storage and also I want containers to have their non-root filesystems on that remote shared storage.

What options I have.

In case of 2 LXD Host, I need to be able to move containers between those two LXD Host (therefore idea is to use shared shorage for containers and for containers’ data)

== or ==

LXD Server can be used only with its local storage, and so no fault tolerance is available?

Thanks for answer
Alexander

Remotely, that device provides access through NFS. That means that you can only use the dir storage driver. There is a small chance you cannot use that either if NFS is not compatible with LXD.

You also mention that it can also be used as iScsi storage. Does it appear as a raw device to the computer? You might be able to use the ZFS storage driver.

LXD can be used with storage high availability if you use CEPH as a backend storage for the containers.

You can also do an NFS mount into /var/lib/lxd making sure that all files are there, but there is no way having more than one LXD server using that mount point.

If you want to mount a remote NFS mount point inside of a container you need to first mount the NFS mount point into the LXD host and then add a disk device to the container with that mount point as the source. Make sure to have the correct permissions set on the NFS share so that the container can write/read from the NFS share as well.

1 Like