I am setting up a new Proxmox server. I have a pair of mirrored NVME drives for the VMs. I also have a zfs pool of mirrors on spinning rust (2 x 18TB SATA HDD times two). The rust drive pool is for larger storage needs like the data directories for immich, nextcloud, etc. What is the best practice for mounting the rust-based data in the VMs?
I had a different answer for this and the more I read your question, the less I’m sure I understand your situation.
I think you’re saying this machine is already set up. Does your rust pool already have the photos on it?
I can think of a couple easy options: either provision a virtual disk from your rust data store in PVE and attach it to your VM or set up an nfs server on PVE and mount it in your VM (I like autofs
for this).
I usually prefer that latter route since it makes access to the raw files easier outside the VM. If you want to manage the backup of the data from within PVE, you’d need to use the virtual disk method.
My apologies for the confusion. This is not setup. The drive layout is my intended setup and I should have said the rust drive pool will be for larger storage. For example, right now I have a server running docker in a VM with immich and nextcloud. For both of those, I mount shares from a NAS via nfs and bind to the docker containers. I want to migrate to a single proxmox server and I was looking for a way to replicate the way the VMs/containers work now (i.e., they operate on a separate file system and for big storage needs I pull in datasets from a NAS so I can take advantage of snapshots, replication, and the larger size the spinning drives afford).
It sounds like your advice is to replicate this setup nearly directly within PVE with nfs. But, if I don’t care about access to the files outside of the VM, I could go the virtual disk route.
Gotcha. Another thought, then: I’m fond of running docker in Proxmox LXC containers. If you do that, you can bindmount the directory from the PVE host right into the LXC. You have to be careful of permissions (root
’s UID is shifted to 100000 in an unprivileged LXC), but that takes away the need for NFS.
Thanks very much for the reply. I poked around in forums and chatted with my favorite AI overlord, but there is no substitute for talking to someone who can give you a quick informed answer!
Sure thing! Hope it helps