Subject: Re: dump and FileSystem Buffer Cache
To: Louis Guillaume <>
From: Greg A. Woods <>
List: netbsd-users
Date: 03/10/2005 14:44:09
[ On Wednesday, March 9, 2005 at 18:53:45 (-0500), Louis Guillaume wrote: ]
> Subject: dump and FileSystem Buffer Cache
> Basically the issue is that, when dump-ing a mounted, active filesystem, 
> there are still data in the kernel's filesystem buffer cache that 
> havent't yet been sync'd to the disk. Since dump reads from the block 
> device, and these data are not available except through the filesystem, 
> bad dumps can occur.

As was hinted if you dump from the block device, instead of the raw
device, then the unwritten data from the cache (which can be a lot when
softdep is in use on a busy filesystem!) is also included in the dump.

However that may not solve your problem...

> What are the alternatives?

Well even if you avoid the issue of modified data in the cache, it's
impossible to guarantee that all data will be self-constent unless all
the files are also closed, and that is done best by unmounting the
filesystem.  If you can't unmount the filesystem during the backup then
application data may still be inconsistent.

You may also have to make sure all the applications are shutdown cleanly
so that they leave their files in a consistent state when they close
them!  :-)

Obviously even filesystem snapshots don't guarantee consistency unless
you first close all of the open files (and make sure they stay closed
until after the snapshot has been created).

Snapshots only help reduce the downtime from the lengthy downtime it
takes to do a full (or incremental) backup to just the (far shorter)
time it takes to create the snapshot.

						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>