snapshot implementation

Patrick Proniewski patpro at patpro.net
Wed Dec 23 09:12:48 UTC 2009


Hello,

I'm playing a little bit with freebsd snapshots (on UFS, freebsd 6.4).  
And I can't find the answer to one of my questions.
If I understand correctly:
- at time=0 a snapshot contains nothing but a bit/block map, and every  
block in the block map is either a pointer to "not used" or "not  
copied".
The pointer to "not used" is used when the corresponding block on the  
live file system is empty. The pointer "not copied" is used when the  
corresponding block on the live FS has not changed since time=0.
- at time>0 every non-empty block on the live FS that is to be  
modified, is first copied in the snapshot, and then, the pending  
modification is committed. The pointer in the snapshot's block map  
changes from "not copied" to the address of the copied block in the  
snapshot.
But what about empty blocks? I can't find any information about them.
It seems logical to me that empty blocks receiving new data on the  
live FS will stay as pointers to "not used" in the snapshot, instead  
of pointing to an empty block that would be copied in the snapshot and  
grow it's size. I've not found any piece of documentation that clarify  
this.

By the way, I'm also interested in ZFS: is the snapshot technology  
available in ZFS the same as the one available in UFS?

thanks,
patpro



More information about the freebsd-fs mailing list