ZFS mount same dataset to multiple LXC containers

KuDDlowski

New Member
Nov 28, 2022
2
0
1
Hello everyone!

I am currently running a Proxmox host and a file server / plex server separately as two different machines. I'd like to downsize my home environment and therefore add Disk capacity to the Proxmox Server that should then replace the separate file server / plex server.

My idea was to create a zfs pool from that single disk, then create two new LXC containers (-> LXC1: plex / LXC2: file server) and let both of these new containers mount the same zfs dataset.

Is it possible to read and write to the same zfs dataset from multiple LXC containers? I am not planning to make the zfs dataset the rootfs of the new containers, it can be a simple mount to "/data" within the container fs.

Thanks in advance!
 
My idea was to create a zfs pool from that single disk, then create two new LXC containers (-> LXC1: plex / LXC2: file server) and let both of these new containers mount the same zfs dataset.

Is it possible to read and write to the same zfs dataset from multiple LXC containers?
Yes, that is hat bind-mounting is for: https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
But in case of unprivileged LXCs you will have to fight with user remapping.
 
Thanks for confirming :) I did read a lot about bind mounts but I thought it might be a good idea to double check before buying rather expensive high capacity disks since it was never really mentioned to mount the exact same dataset to multiple LXC containers at the same time.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!