Subject: Re: du and btrfs
From: [email-masked] (Trent W. Buck)
To: [email-masked]
Date: Sun, 14 Dec 2014 23:25:39 +1100

James Harper <[email-masked]>
writes:

> Just a curiousity... I'm nc-ing a disk image from a laptop, like:
> gzip </dev/sda | nc target 4242
> and on the target computer:
> nc -l -p 4242 | gunzip | dd bs=4k conv=sparse of=laptop-xp.img
> and on the target computer I am also impatiently doing:
> du -sk --apparent-size laptop-xp.img && du -sk laptop-xp.img
> and the output is a bit strange.
> [boring numbers...]
> What's with that? The filesystem is btrfs but I don't know that that's anything to do with it.

Try HUPping the dd instead (or use gddrescue) to find out how much IT
thinks is written.  btrfs is probably just being weird in what it tells
df/du -- I see that a lot.