How delete zfs snapshot proxmox.

guilloking

New Member
Oct 19, 2022
18
1
3
Dear partners.

Can you help me, it turns out that my zpool disk is filling up due to the zfs snapshots, I would like to know how I can recover that space.

Attached list:

zfs list -t snapshot

rpool/vmdata/subvol-100-disk-0@zfs-auto-snap_monthly-2022-09-01-1152 29.8G - 54.3G
rpool/vmdata/subvol-100-disk-0@zfs-auto-snap_monthly-2022-10-01-1152 31.0G - 55.8G
rpool/vmdata/subvol-100-disk-0@zfs-auto-snap_weekly-2022-10-23-1147 30.3G - 55.5G
rpool/vmdata/subvol-100-disk-0@zfs-auto-snap_weekly-2022-10-30-1147 30.4G - 56.5G

I would like to remove these.

Thx.
 
With "zfs destroy pool/dataset@snapshotname". So for example zfs destroy rpool/vmdata/subvol-100-disk-0@zfs-auto-snap_monthly-2022-09-01-1152. Don't forget the "@snapshotname" part, or you will delete that dataset and not just the snapshot. But looks like you setup a auto snapshot script. Maybe you should check the pruning option of that script and lower the retention.
 
Ok, very thx,

ok I'm going to try, about the retention script of these auto snapshots I'm not sure where it can be, I'll investigate.
 
With "zfs destroy pool/dataset@snapshotname". So for example zfs destroy rpool/vmdata/subvol-100-disk-0@zfs-auto-snap_monthly-2022-09-01-1152. Don't forget the "@snapshotname" part, or you will delete that dataset and not just the snapshot. But looks like you setup a auto snapshot script. Maybe you should check the pruning option of that script and lower the retention.
Very thx, work the solution.

from 97% low to 65%.

Thx.
 
I would recommend using cv4pve-autosnap. Better than the other ZFS autosnap scripts as it makes use of the PVE API so it won't directly snapshot down on ZFS level but it will tell PVE to do a snapshot. That way PVE will also do a fsfreeze before doing the snapshot to ensure data integrity by making use of the QEMU guest agent. And you can also setup pruning, so that it for example will do a hourly snapshot but only keep the last 24 snapshots.

And you set up monthly snapshots. Snapshots will grow over time the older they get. For long term backups I would skip snapshots and use the proxmox backup server instead. PBS backups will consume less space. Snapshots are in my opinion only good for short retention like hours to days, not weeks or months.
 
Last edited:
Hello.

One question, how do I disable zfs-auto-snapshot, comment out the scheduled task but it continues to run.
 
Did you also look for these files?
/etc/cron.d/zfs-auto-snapshot
/etc/cron.hourly/zfs-auto-snapshot
/etc/cron.daily/zfs-auto-snapshot
/etc/cron.weekly/zfs-auto-snapshot
/etc/cron.monthly/zfs-auto-snapshot
 

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!