Snapshot backup of CT with btrfs mountpoint on LVM thin

Andy Buchanan

Member
Jun 21, 2019
4
0
6
44
I have a node with LVM thin storage on which I run a container that has to store a very large number of small files. I was running out of inodes using the default ext4, so created a mountpoint and manually formatted it with btrfs (which is able to handle many small files). Works well, all good.

Now I need to enable backup for this container. The default snapshot method doesn't work because btrfs does not support mounting what it considers to be the same filesystem twice. This question https://unix.stackexchange.com/questions/537029/error-for-mount-system-call-failed-file-exists and the top answer goes into why this doesn't work, and some suggested solutions.

Using the stop backup method does work, but is not an option for me in this case as I need the container to be continuously running.

I'd like to come up with a solution for this which involves as little non-standard stuff as possible. Ideas so far, in increasing order of pain:

1. Move to a VM and take the performance hit.
2. Backup the data some other way, i.e. not at the container level, and live with the lack of unification.
3. Modify Proxmox backup tooling to use btrfs snapshots for backup instead of LVM ones. (this is probably the best longterm solution but beyond my ability.)
4. Modify Proxmox backup tooling to kluge btrfs to work with LVM snapshots for backup (e.g. changing UUID).

Any thoughts on which of these is best, or if I've missed any options, would be gratefully received.
 
Last edited:
I would say number 3 !
It's imo a bit odd to say the least that proxmox is not supporting snapshots on btrfs in 2023 as snapshots are easily setup and native to btrfs and the filesystem is long time ready to enter prod state...
I setup my proxmox on btrfs and now also left without vm snapshots. Not OK!
Not using zfs as it will destroy my ssd's rapidly!
 
Last edited:

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!