sharp increase in 'used' blocks after plain fs copy

Bryan Kadzban bryan at kadzban.is-a-geek.net
Sun Jul 20 16:11:34 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
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,
possibly?

> 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.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIg2O1S5vET1Wea5wRAyJ9AKDYkcID3PoPCUEMkCnvZNIlq+jWFgCgxsSB
t4UKd9oe9M6nSAvWKELAxoo=
=uBjE
-----END PGP SIGNATURE-----




More information about the Ext3-users mailing list