DO NOT REPLY [Bug 3485] rsync uses more space in destination even with -S specified

bugzilla-daemon at dp3.samba.org bugzilla-daemon at dp3.samba.org
Mon Feb 6 21:16:46 GMT 2006


https://bugzilla.samba.org/show_bug.cgi?id=3485


wayned at samba.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #3 from wayned at samba.org  2006-02-06 14:16 MST -------
There are a few places where space can be different:

1. (Already covered) hard-linked files in the transfer becoming unlinked.
(needs -H)

2. The blocksize of the destination filesystem is different from the source
filesystem, so "du" (which counts the wasted space in its block total) can
report a different value if the amount of wasted space is different.

3. There could be some wasted space in directory files (depending on the
filesystem) because rsync uses a temporary-file name and renames it at the end.
(This would probably be a small amount of space, however.)

4. (Also already covered) Sparse files need to be copied sparsely. (requires
-S)

I can't think of any other reasons for the sizes to differ.  I ran some simple
tests and wasn't able to reproduce the problem (in fact, for one sparse-file I
created, "cp -a" changed the blocksize from 9 to 133, but rsync kept the file
at 9 blocks).

Here are some things to check:

1. Was the test between cp and rsync done on the same hard-disk partition (so
that changes in block size are ruled out)?

2. Was -S used during the first copy, not just the updates?  (Rsync won't know
that a file needs to be updated if its mtime and byte-size match, even if it
was copied the first time without -S.)

3. What are the actual files that differ?  I'd suggest running this on each of
the resulting dirs:

find . -printf '%p\t%b\t%s\t%n\n' | sort >/tmp/foo.txt

You can then compare both the output files and see which items differ in block-
and/or byte-size.  If you find a difference, figure out what it's due to:
changes in sparse size? directory-size variance? hard-link count wrong? 
Hopefully that will help you to narrow down what is the cause of you're seeing.


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list