dd of mounted filesystem

Dan Nelson dnelson at allantgroup.com
Fri Dec 12 07:29:24 PST 2003

In the last episode (Dec 12), Dru said:
> On Thu, 11 Dec 2003, Dan Nelson wrote:
> > In the last episode (Dec 11), Matthew Seaman said:
> > > Remember that dd(1) traverses the block device sequentially, but
> > > that most FS accesses are random, so any particular change can
> > > span either side of dd(1)'s offset.  Also that dd'ing from the
> > > block device bypasses the usual machinery for doing file IO --
> > > machinery that is designed under the premise that it will have
> > > sole control over what gets read or written where and when.
> >
> > On current you can get around the consistency problem by dd'ing a
> > snapshot of the filesystem, just like dump's -L flag does.
> You mean, run "makesnap_ffs" first? I've been meaning to play with
> that one, I'll have to try it out.

I don't think that's a standard FreeBSD command; what I was thinking of
was something like:

mount -u -o snapshot /usr/.snap/snap1 /usr
dd if=/usr/.snap/snap1 of=blah bs=64k
rm /usr/.snap/snap1

	Dan Nelson
	dnelson at allantgroup.com

More information about the freebsd-questions mailing list