Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jan 2007 09:23:41 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-hackers@FreeBSD.ORG, dgilbert@dclg.ca, perryh@pluto.rain.com
Subject:   Re: dump reads more than restore writes?
Message-ID:  <200701080823.l088Nfqe082552@lurza.secnetix.de>
In-Reply-To: <45a1c260./gHVPL2TJkCotGTS%perryh@pluto.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
perryh@pluto.rain.com wrote:
 > [...]
 > > Is dump reading substantially more than restore is writing?
 > 
 > Quite possibly, esp. if the source disk is nowhere near full and/or
 > most of the files being handled are small.  dump reads every inode
 > on the disk, including those which are unallocated,

I don't think it does that.  Why should it read inodes that
are unallocated?  It reads the directory tree of the file
system, so it knows which inodes are allocated, and there's
no reason to read anything beyond that.

However, it is true that dump|restore is a slow way to copy
a file system.  It's much faster to mount it and then use
something like "cd $SRC; find -d . | cpio -dump $DST", or
cpdup (from ports/sysutils/cpdup), or even tar.  If the
file systems are the same size and nearly full, then dd(1)
is probably the fastest way to copy it (but neither of them
must be mounted, of course).  If it's not nearly full, dd
is inefficient because it simply copies the device without
regard to what areas are actually unallocated to files.

However, I think that there must be a bug in gstat when it
displays 600 GB read to copy a 200 GB file system.  dump(8)
is inefficient, but not _that_ inefficient.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"anyone new to programming should be kept as far from C++ as
possible;  actually showing the stuff should be considered a
criminal offence" -- Jacek Generowicz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701080823.l088Nfqe082552>