> This may be a bit dimwitted since I don't really understand how > snapshots work. I mean the part concerning COW (copy on right) and > how it takes so little room.
COW and snapshots are very simple to explain. Suppose you're chugging along using your filesystem, and then one moment, you tell the filesystem to "freeze." Well, suppose a minute later you tell the FS to overwrite some block that's in use already. Instead of overwriting the actual block on disk, the FS will overwrite some unused space, and report back to you that the operation is completed. So now there's a "copy" of the block as it was at the moment of the "freeze," and there's another "copy" of the block as it looks later in time. The FS only needs to freeze the FS tables, to remember which blocks belonged to which files in each of the snapshots. Hence, Copy On Write. That being said, it's an inaccurate description to say "COW takes so little room." If anything, it takes more room than a filesystem which can't do COW, because the FS must not delete any of the old blocks belonging to any of the old "snapshots" of the filesystem. The more frequently you take snapshots, and the older your oldest snap is, and the more volatile your data is, changing large sequences of blocks rapidly ... The more disk space will be consumed. No block is free, as long as any one of the snaps references it. But suppose you have n snapshots. In a non-COW filesystem, you would have n-times the data. While in COW, you still have 1x the total used data size, plus the byte differentials necessary to resurrect any/all of the old snapshots. > I'm thinking of scripting something like 10 minute snapshots during > the time I'm working on a project, then just turn it off when not > working on it. When project is done... zap all those snapshots. Yup, that's absolutely easy. Just set up a cron job to snap every 10 minutes, using a unique string in the snapname, like "@myprojectsnap" ... and when you're all done, you "zfs destroy" anything which matches "@myprojectsnap" _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss