Hacker News new | ask | show | jobs
by Dylan16807 1832 days ago
Let's say you want to clear out part of a snapshot of /home, but keep the rest.

So you clone it and delete some files. All good so far, but the snapshot is still wasting space and needs to be deleted.

But to make this happen, your clone has to stop being copy-on-write. All the data that exists in both /home and the clone will now be duplicated.

And you could say "plan ahead more", but even if you split up your drive into many filesystems, now you have the problem that you can't move files between these different directories without making extra copies.

2 comments

To put it in other words, zfs doesn't support rebasing a clone off of a newer snapshot. Otherwise e.g. you could create a clone, snapshot each clone, create two new clones and promote them, and then delete the original snapshot. But what zfs does is re-attach the original snapshot to the promoted clone of the original volume, and it is still the referred base of the other clone.
I’m a beginner in ZFS, but copying the modified clone and then destroying the clone and the snapshot would solve your problem, wouldn’t it?