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.
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: