Either setup an NFS/iSCSI share or pass-through the HBA (if you use any), or the disks to the VM.
NFS is a file based sharing, while iSCSI is usually block oriented (and a bit more complicated to set up ).
iSCSI targets behave like local disks, so you would need one for each VM and backing up would be the task of the VM mainly, since the host only sees blocks. Therefore I would go for NFS, which can be backed up on host level.
There are a plethora of tutotials on how to share files via NFS. Usually you define the shares in /etc/exports. ZFS is also able to share via NFS natively, but I haven't tried that myself yet. Here you'll get some info about that: https://blog.programster.org/sharing-zfs-datasets-via-nfs
Be careful when you try to share the same files through more than one mean, because that's very prone to data loss due to incompatible locking mechanisms.
Additionally, a separate VLAN for NFS is recommended.
You should probably use separate datasets or folders within it, then. Or have the LXC container also use NFS.Do you mean for instance if I share a dataset through NFS while at the same time bind mounting it to an LXC container. How should I handle a case like that (that situation might actually be applicable to me).
No, you're right, then all traffic is handled locally.Is this an issue as long as the NFS sharing is only happening internally on the server? I.e. between the local HDD ZFS pool and the VM's?
I don't see a difference as well. Although I haven't experienced a kernel crash because of NFS so far. Then again, I don't have a ton of experience with NFS, so this might indeed be valid.Edit: I have read some post where people are using an LXC container to share datasets with NFS and that this is not recommended because if the NFS server kernel crashes the Proxmox host might also crash. How is this different from running the NFS server directly on the host?
Only privileged LXCs can mount NFS shares. For unprivileged LXCs bind-mounting is the only option.Or have the LXC container also use NFS.
Interesting. What is the advantage with SSHFS vs NFS? Also could you not run Plex in an LXC?What i like to do is install SSHFS, I need my plex VM to access the media files stored on my HDD pool, much like your setup.
Prior to that I had plex running in a docker container on my proxmox host, that solves the issue with volume mounts. But I needed HW transcoding which was a pain to setup via docker.
You can run plex in a LXC, but the point here is the hardware encoding. With a LXC your slow CPU has to do all the encoding and the fast GPU can't be used.Also could you not run Plex in an LXC?