Subject: Re: Which snapshot strategy to use? was: How to capture all file system writes
To: None <tech-kern@netbsd.org>
From: Eduardo Horvath <eeh@NetBSD.org>
List: tech-kern
Date: 10/23/2003 17:59:30
On Wed, Oct 22, 2003 at 07:52:08PM +0200, Juergen Hannken-Illjes wrote:
> On Wed, Oct 22, 2003 at 12:44:53PM -0400, Stephan Uphoff wrote:

> I can see two different approaches to file system snapshots:
> 
> 1) Kirk McKusick ffs snapshots from FreeBSD. It is an extension of the
>    ffs file system with these properties (I hope I get them right..):
> 
>    - Backing store is always the snapshotted file system.
>    - The snapshot appears as a file whose size is the size of the file
>      system. Blocks unallocated at the time of the snapshot read as 0's.
>    - It allows up to 20 snapshots per file system
>    - The snapshots survive unmounts and reboots.
> 
>    - Mounting or dumping the snapshot is possible through vnd(4) and/or
>      some modifications to dump(8).
> 2) A somewhat generic approach similar to the fssnap from Solaris:
> 
>    - Backing store must be on another file system (or swap / memory).
>    - The snapshot appears as a raw/block pseudo device. It is possible
>      to freeze the unallocated blocks as well.
>    - Number of snapshots is bound by the number of pseudo devices.
>    - The snapshots get cleared on unmount.

3) Use union mounts.  The lower level becomes the filesystem snapshot,
whild the upper layer is the operating filesystem.

Eduardo