3 ms·
I wish filesystems had a first-in, first-out "garbage heap" model. The problem with snapshots is that they take up space. The trash has the same issue, with th
by miki123211 2y ago
I wish filesystems had a first-in, first-out "garbage heap" model.
The problem with snapshots is that they take up space. The trash has the same issue, with the added drawback that you have to think about emptying it, and if you empty it before realizing you made a mistake, it won't help you.
With a "garbage heap" model, all deleted files would automatically end up on the "heap" when deleted. The heap would be exactly as large as the amount of free space you have left, and shrink when necessary by deleting the oldest files, perhaps with a minimum size (expressed in days) that would require manual action to shrink beyond.
- VoidWhisperer 2y agoThere would still have be some buffer between the amount of space you have left and the size of this heap - even if the OS were changed to treat this specific case as not being out of disk space, it would significantly impact write performance on the disk once it is 'full', because any disk operation would have potentially double the number of operations required compared to being able to write it to empty space on the disk
- E39M5S62 2y agoSnapshots on ZFS only take up space when files change. It's easy to use one of the many snapshot managers to accomplish what you want - I do it for my workstation and laptop. I have zero fear of deleting files, upgrading the OS, making sweeping changes to my system config, etc.
- accelbred 2y agoOn a CoW filesystem like btrfs/bcachefs/zfs, a snapshot only has the overhead of the delta, so are cheap. Btrbk can also take disk space into account for garbage collecting snapshots? Not sure.