Remove Zfs Snapshot - Best Practise

yena

Renowned Member
Nov 18, 2011
385
6
83
Hello,
what is the best practice to remove old zfs snapshot ?
Can i remove only strating from newer or can i start olso from older ?
Can i remove a random snapshot without corrupt others ?
Can i remove all VM snapshot using one commant line ?

Thanks!
 
Hello,
what is the best practice to remove old zfs snapshot ?
Can i remove only strating from newer or can i start olso from older ?
No matter.
Can i remove a random snapshot without corrupt others ?
Please explain briefly.
Can i remove all VM snapshot using one commant line ?
Yes, but not tested:
Code:
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy
 
Can i remove a random snapshot without corrupt others ?

Yes, a snapshot is (simplified) only a reference to all used blocks, destroying one will only free the space that is only referenced once in this snapshot. Predicting how much space is freed by destroying a snapshot is not as easy as it sounds, it's quite the opposite.
 
Oh ... one remark:

If you created the snapshots via the GUI and not directly with zfs snapshot, please use qm delsnapshot for this.
 
  • Like
Reactions: fireon