ZFS mounting dataset inside LXC container dataset

jimmy90

New Member
Jun 9, 2025
3
0
1
i have copied (zfs send) a zfs dataset to my proxmox server and set the mount point to be a subdirectory of one of my LXC containers

/rpool/data/subvol-103-disk-0/srv/postgres

when i reboot the container the contents of the directory are empty inside the container

when i ssh into promox the directory contents (the dataset contents) are all there

if i then re-set the moutpoint of the dataset while the container is running

zfs set mountpoint=/rpool/data/subvol-103-disk-0/srv/postgres rpool/postgres-data

the contents are now visible inside the container

is what i am doing a really bad idea which is why i'm having issues or is there something i can do to make the dataset content visible inside the container on boot?

thanks for you help, proxmox has been awesome for me for years and years <3
 
Last edited:
can anyone advise if this is "safe" use (unlikely to lead to instability or data corruption) of zfs with the proxmox/zfs/lxc stack?

thanks again
 
i guess no-one else has experienced disappearing zfs datasets inside containers?

is it worth reporting as a bug?
 
It's normal that this is not working. Just don't do what you did and have the mountpoint at the default, inherited location and bind-mound it youself to the container via the PVE GUI. It then will be always correctly mounted (could than have other problems with uids)