snapshot implementation
Barry Pederson
bp at barryp.org
Wed Dec 23 20:56:22 UTC 2009
On 12/23/09 10:41 AM, Bob Friesenhahn wrote:
> On Wed, 23 Dec 2009, Patrick Proniewski wrote:
>
>> By the way, I'm also interested in ZFS: is the snapshot technology
>> available in ZFS the same as the one available in UFS?
>
> I don't know anything about snapshots in UFS, but snapshots in ZFS are
> certainly remarkably different. ZFS uses copy-on-write (COW) whenever a
> data block is updated and snapshot creation simply adds a new reference
> to existing blocks. The snapshot is made available as a (usually) hidden
> directory (/filesystem/.zfs/snapshot/snapname) which contains the
> complete filesystem content at the time the snapshot was taken. In my
> experience, ZFS snapshots usually take less than a second to complete.
> They are so efficient that some systems have snapshots scheduled to be
> taken every five minutes as a defense against user/application error.
I always liked this quote from this writeup on ZFS:
http://www.sun.com/bigadmin/features/articles/zfs_part2_ease.jsp
"...there's virtually no overhead at all due to the copy-on-write
architecture. In fact, sometimes it is faster to take a snapshot rather
than free the blocks containing the old data!"
That's certainly not the case with UFS snapshots, which can take a long
time to complete (we're talking freezing your machine's disk activity
for many minutes), and are limited to 20 total.
Barry
More information about the freebsd-fs
mailing list