sharp increase in 'used' blocks after plain fs copy

Bryan Kadzban bryan at
Sun Jul 20 16:11:34 UTC 2008

Hash: RIPEMD160

Victoria Muntean wrote:
> I copied all files from 8GB partition to 12GB empty partition using
> rsync. What caught my eyes, df -k was 1.2 used GB on the source
> partition, but 2.2 GB on the dest partition after copy. And dest was
> empty before copy.

Hardlinks (especially to large files) that got copied as separate files,

> basically small debian 4 install.

Maybe hardlinks then.  There are lots of hardlinks in e.g. a full gcc
installation (that is, gcc plus binutils), and a fair number of other
packages can create a hardlink or two.  The default setup for the
terminfo database from ncurses also uses lots of hardlinks.  (There's an
option in ncurses' configure script to make it use symlinks, but I don't
know how Debian configures it.)

See if rsync has an option to copy links as links instead of making
another copy of the file, and see if that helps any.  (Do this for
symlinks as well, if it has that as an option.  Symlinks to directories
are particularly problematic.)

Also check whether du and df on the old partition agree on the amount of
space used, and whether du on the old partition matches df on the new
fairly closely.  If the latter but not the former, then it's either
hardlinks (which would make the target of the copy larger) or unlinked
files that are still on the disk because some process has them open
(which would make the target of the copy smaller).

(Or just blit over the partition's image, after ensuring it's not
mounted...  resize2fs can help with this.)
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the Ext3-users mailing list