LXC Containers + Bindmounts + ZFS Snapshots

soapee01

Member
Sep 7, 2016
28
1
23
66
If I have a linux LXC container installed on ZFS, with some bindmounts manually added to the configuration (also zfs, but a different dataset on the same pool), I cannot take zfs snapshots any more.

Is there a way around this? I don't care about snapshotting the datasets. I'm doing that manually with cronjobs. I just need the guest OS drive.

Thanks!

example configuration:

# cat /etc/pve/lxc/105.conf arch: amd64 cores: 2 hostname: nextcloud memory: 2048 mp0: /mnt/bindmounts/nextcloud,mp=/mnt/nextcloud net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.1.1,hwaddr=DE:AD:BE_EF:94:EE,ip=192.168.1.2/24,type=veth onboot: 1 ostype: ubuntu protection: 1 rootfs: VirtualMachines:subvol-105-disk-0,size=25G swap: 2048 unprivileged: 1
 

H4R0

Active Member
Apr 5, 2020
611
130
43
Just snapshot "subvol-105-disk-0" with your cronjob, it's the same way as with the bind mounts.

I would recommend autosnapshot or other tools that automatically create snapshots and destroy them.
 

soapee01

Member
Sep 7, 2016
28
1
23
66
So there's no way to do it with proxmox or something like cv4pve-autosnap so it shows up in the GUI for easy rollbacks?

I can obviously do something like 'zfs snapshot rpool/foo' but it's less desireable.

Thanks!
 

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 your own in 60 seconds.

Buy now!