Like a VM virtual disk? Those are exclusive to each VM and can’t be shared, so if you want multiple VMs to access the same data then NFS would be needed.
But containers with bind mounts don’t have that limitation and multiple containers can access the same data (such as media).
Just to be clear, are you saying that when you’re using bind-mounted ZFS pools, it’s okay to write from two containers (or both the proxmox host and a container) at the same time?
Also, I think I managed to accomplish that for a VM by creating a Proxmox Directory pointing to a path in a zpool, adding it to the VM using virtiofs, and mounting it within the VM. I’m not sure if writes from both the VM and the host are safe in that case either, though.
thelemonalex@lemmy.world 7 months ago
Okay, I have one of the pools that is pretty empty and has non-critical data, and I think I’ll try migrating that first, and see if it’s imported correctly by Proxmox.
About Containers, I think I’ll have to do some more research because I think I haven’t fully understood yet how they compare to VMs. Or like, when I should the one over the other. I guess I could have a Container with a bind mount to a dataset that I want to be shareable over NFS or SMB, and handle that from whatever OS I put in the Container, right? But, I could also have a VM do that, and though it wouldn’t be able to share the data with other VMs, it can do it over NFS, can’t it? What are the advantages of doing one thing over the other?
Well, in any case, thank you for your patience, for going over each detail and taking the time to correct me where I’m wrong. I’m learning a lot, so thank you!
MangoPenguin@lemmy.blahaj.zone 7 months ago
Essentially a container shares the kernel of the host, so uses less resources to run.
VMs are useful when you need more isolation or a different kernel (or need to add kernel modules).
For most purposes containers are the easy option.
Yep!
Also yes, just a more complex setup with more performance penalty due to using NFS to share data into the VM.
thelemonalex@lemmy.world 6 months ago
I see, okay, I’ll try out containers then. So far, I’ve been able to migrate a ZFS Pool without issues, so I’ll start migrating them all, create a container that manages NFS and see if the existing Docker VM picks up the NFS shares successfully. Thank you for going in-depth and explaining everything to me. I’ve learnt a lot!