> From: zfs-discuss-boun...@opensolaris.org [mailto:zfs-discuss- > boun...@opensolaris.org] On Behalf Of Orvar Korvar > > I was thinking to delete all zfs snapshots before zfs send receive to > another new zpool. Then everything would be defragmented, I thought.
You don't need to delete snaps before zfs send, if your goal is to "defragment" your filesystem. Just perform a single zfs send, and don't do any incrementals afterward. The receiving filesystem will layout the filesystem as it wishes. > (I assume snapshots works this way: I snapshot once and do some > changes, say delete file "A" and edit file "B". When I delete the > snapshot, the file "A" is still deleted and file "B" is still edited. > In other words, deletion of snapshot does not revert back the changes. You are correct. A snapshot is a read-only image of the filesystem, as it was, at some time in the past. If you destroy the snapshot, you've only destroyed the snapshot. You haven't destroyed the most recent "live" version of the filesystem. If you wanted to, you could rollback, which destroys the "live" version of the filesystem, and restores you back to some snapshot. But that is a very different operation. Rollback is not at all similar to destroying a snapshot. These two operations are basically opposites of each other. All of this is discussed in the man pages. I suggest "man zpool" and "man zfs" Everything you need to know is written there. _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss