apprell / proxmox-autosnap

Automatic ZFS Snapshot Script for Proxmox VE 5, 6, 7 and 8
73 stars 15 forks source link

Note creation of lots of files in /etc/lvm/archive #18

Open valankar opened 4 weeks ago

valankar commented 4 weeks ago

Thanks for this script, it's quite useful.

Something I noticed recently is when LVM snapshots are made, every old config is stored in /etc/lvm/archive by default. When running the snapshot script hourly, this directory can fill up with a lot of files, which surprised me. I ended up having a cron to delete old files in that directory. Might be worthwhile to just note it in the readme. Ideally I would prefer to skip snapshots for LVM, but this is probably not possible since vms/containers could have a combination of both LVM and ZFS resources.

lowell80 commented 4 weeks ago

Does tweaking the backup section of /etc/lvm/lvm.conf help at all? Specifically the retain_min and retain_days values could be helpful.

(I'm not associated with this project at all. I just started using it stubbled upon this question.)

valankar commented 4 weeks ago

Unfortunately not. These are minimum settings, not maximum.

https://serverfault.com/questions/653261/lvm-archive-and-backup-files-not-purging

jocelynj commented 2 weeks ago

As far as I know, ZFS snapshots are automatically removed by Proxmox itself when a lxc snapshot is removed. So, should these LVM metadata be automatically removed by Proxmox?

You could skip snapshots for LVM by using some tags on Proxmox, and exclude them on the command line.