On Wed, Apr 21, 2010 at 04:49:30PM +0100, Darren J Moffat wrote:
> /foo is the filesystem
> /foo/bar is a directory in the filesystem
> 
> cd /foo/bar/
> touch stuff
> 
> [ you wait, time passes; a snapshot is taken ]
> 
> At this point /foo/bar/.snapshot/.../stuff exists
> 
> Now do this:
> 
> rm -rf /foo/bar
> 
> There is a snapshot of /foo/bar/stuff in the ZFS model to get to it
> you go to /foo/.zfs/snapshot/<name>/bar  and in there you will find
> the file called stuff.

Same thing on a netapp except for the name of the virtual directory.

> How do you find what was /foo/bar/stuff in the model where the
> .snapshot directory exists at every subdir rather than just at the
> filesystem root when the subdirs have been removed ?

The .snapshot directory still exists at the filesystem root.  It's not a
replacement for that.

Asking for the contents of /a/b/c/d/e/.snapshot gives you a view as if
you had asked for /a/.snapshot/b/c/d/e (assuming /a is the filesystem).

The benefits arise when the filesystem root is not mounted, or you don't
have access to it, or you don't know where it is, and the hierarchy
isn't under constant change (which is true any place that my users care
about). 

> What does it look like when the directory hierarchy is really deep ?

Same thing that .zfs/<snapshot>/a/b/c/d/e/f/g/h looks like, but you can
enter the snapshot tree at any directory that exists in the live
filesystem as well as from the top.

-- 
Darren
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to