On Apr 25, 2010, at 5:45 AM, Edward Ned Harvey wrote:

>> From: Richard Elling [mailto:richard.ell...@gmail.com]
>> Sent: Saturday, April 24, 2010 7:42 PM
>> 
>> Next,
>>      mv /a/e /a/E
>>      ls -l a/e/.snapshot/snaptime
>> 
>> ENOENT?
>> 
>>      ls -l a/E/.snapshot/snapname/d.txt
>> 
>> this should be ENOENT because d.txt did not exist in a/E at snaptime.
> 
> Incorrect.  
> 
> E did exist.  Inode 12345 existed, but it had a different name at the time
> of snapshot.  Therefore, 
> a/e/.snapshot/snapname/c/d.txt  is the file at the time of snapshot.
> But these are also the same thing:
> a/E/.snapshot/snapname/c/d.txt
> a/E/c/.snapshot/snapname/d.txt

OK, I'll believe you.

How about this?

        mv a/E/c a/c
        mv a/E a/c
        mv a/c a/E

now a/E/.snapshot/snapname/c/d.txt is ENOENT, correct?


> It would be very annoying if you could have a directory named "foo" which
> contains all the snapshots for its own history, and then "mv foo bar" and
> suddenly the snapshots all disappear.  This is not the behavior.
> 
> The behavior is:  If you "mv foo bar" then the snapshots which were
> previously accessible under foo are now accessible under bar.  However, if
> you look in the snapshot of foo's parent, then you will see "foo" and not
> "bar".   Just the way it would have looked, at the time of the snapshot.
> 

The only way I know to describe this is that the path is lost.
In other words, you cannot say ../.snapshot/snapname/self is the same as
self/.snapshot/snapname, thus the relationship previously described as:

        Snapshots are taken.  You can either file.txt via any of the following:
          /root/.snapshot/branch/leaf/file.txt
          /root/branch/.snapshot/leaf/file.txt
          /root/branch/leaf/.snapshot/file.txt

is not guaranteed to be correct.
 -- richard

ZFS storage and performance consulting at http://www.RichardElling.com
ZFS training on deduplication, NexentaStor, and NAS performance
Las Vegas, April 29-30, 2010 http://nexenta-vegas.eventbrite.com 





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

Reply via email to