From owner-freebsd-current@FreeBSD.ORG Tue May 19 04:50:53 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F119106566C for ; Tue, 19 May 2009 04:50:53 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 325988FC0C for ; Tue, 19 May 2009 04:50:53 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-019-074.pools.arcor-ip.net [88.66.19.74]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MKv5w-1M6H5l2MS0-0001V0; Tue, 19 May 2009 06:38:17 +0200 Received: (qmail 12714 invoked from network); 19 May 2009 04:38:17 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.188) by router.laiers.local with SMTP; 19 May 2009 04:38:17 -0000 From: Max Laier Organization: FreeBSD To: freebsd-current@freebsd.org Date: Tue, 19 May 2009 06:37:02 +0200 User-Agent: KMail/1.11.3 (Linux/2.6.30-rc3-ARCH; KDE/4.2.3; x86_64; ; ) References: <4A1123C5.3070507@fletchermoorland.co.uk> <4A122C23.40603@freebsd.org> In-Reply-To: <4A122C23.40603@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905190637.03323.max@love2party.net> X-Provags-ID: V01U2FsdGVkX191/ajN6BraL85u3roZzE3fcofmqvO+QSdCHcJ 8CXOCfP7rVIgv6CPiIJNzEcDhdaS0mc5oKAfXbAZi/x7BWjl/5 exdthZmeYzU2m2WkVDO1Q== Cc: Tim Kientzle , Paul Wootton Subject: Re: discrepancies in used space after cpio X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2009 04:50:54 -0000 On Tuesday 19 May 2009 05:48:51 Tim Kientzle wrote: > Paul Wootton wrote: > > I am currently in the process of moving all my data around, going > > from a single zfs drive (ex-mirror) to a zfs raidz. > > I have used cpio to copy the data to the new pool, but a du shows a > > big difference in the results. > > > > Does anyone have any ideas, or does a "du -h ." not do what I think > > it should? > > ... ... > > > demophon# pwd > > /DemoPool/var/tmp/kdecache-paul/kpc > > demophon# ls -lah > > total 1282522 > > drwx------ 2 paul paul 25B May 15 19:35 . > > drwx------ 11 paul paul 16B May 15 19:36 .. > > -rw-r--r-- 1 paul paul 5.0M May 6 16:47 kapman_cache.data > > -rw-r--r-- 1 paul paul 1.3M May 6 16:47 kapman_cache.index > > ... ... > > > demophon# du -h . > > 1.2G . > > > > demophon# pwd > > /var/tmp/kdecache-paul/kpc > > demophon# ls -lah > > total 7833 > > drwx------ 2 paul paul 25B May 18 09:37 . > > drwx------ 11 paul paul 16B May 18 09:12 .. > > -rw-r--r-- 1 paul paul 5.0M May 6 16:47 kapman_cache.data > > -rw-r--r-- 1 paul paul 1.3M May 6 16:47 kapman_cache.index > > ... ... > > > demophon# du -h . > > 7.6M . > > Dmitry Morozovsky wrote: > > Ehmm, possibly stupid question: sparse files? > > Dmitry's probably right here: Files .data/.index are > probably some kind of database package, which are > often highly sparse files. > > Try "du -k *" in each of these directories to see > how much disk space is actually allocated to each file; > that would verify that file sparseness is at issue here. You can also use "du -hA ." to get the apparent size. But, as I assume that "/DemoPool" is the destination and "/var" is the source of your cpio copy, it is quite obvious that sparse files are in play at the source. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News