What is happening here - rsync can't copy where cp can, Input/Output errors

Chris G cl at isbd.net
Mon Dec 10 21:53:22 GMT 2007


I am using rsync  version 2.6.9  protocol version 29 on a Fedora 7
system to backup files to a network drive.

rsync is getting I/O errors when copying maildir files (I'm not sure
if the error is happening with other files but these are the only ones
I have found so far).

I have done some tests on one particular directory, "cp -R" succeeds
but "rsync -r" fails:-

    home# cp -R .in /freecom/backup/home/chris/Mail/
    home# rsync -r .in /freecom/backup/home/chris/Mail/
    rsync: rename "/freecom/backup/home/chris/Mail/.in/audacity/cur/.1172007150.76430_0.newred:2,.PC3iF7" -> ".in/audacity/cur/1172007150.76430_0.newred:2,": Input/output error (5)
    rsync: rename "/freecom/backup/home/chris/Mail/.in/audacity/cur/.1172012773.6188_0.newred:2,.P11kJR" -> ".in/audacity/cur/1172012773.6188_0.newred:2,": Input/output error (5)
    rsync: rename "/freecom/backup/home/chris/Mail/.in/audacity/cur/.1172032604.34523_0.newred:2,.e0feQB" -> ".in/audacity/cur/1172032604.34523_0.newred:2,": Input/output error (5)
    rsync: rename "/freecom/backup/home/chris/Mail/.in/audacity/cur/.1172038263.69147_0.newred:2,.W6m5Zl" -> ".in/audacity/cur/1172038263.69147_0.newred:2,": Input/output error (5)
    rsync: rename "/freecom/backup/home/chris/Mail/.in/freecycle/cur/.1172005922.70482_0.newred:2,S.aIqsGA" -> ".in/freecycle/cur/1172005922.70482_0.newred:2,S": Input/output error (5)
    rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]


If I clear out the destination directory then rsync succeeds once (when
it has to copy the files) but then fails as above every time.  If I add
the --inplace option I get:-

    home# rsync -r --inplace .in /freecom/backup/home/chris/Mail/
    rsync: open "/freecom/backup/home/chris/Mail/.in/audacity/cur/1172007150.76430_0.newred:2," failed: Input/output error (5)
    rsync: open "/freecom/backup/home/chris/Mail/.in/audacity/cur/1172012773.6188_0.newred:2," failed: Input/output error (5)
    rsync: open "/freecom/backup/home/chris/Mail/.in/audacity/cur/1172032604.34523_0.newred:2," failed: Input/output error (5)
    rsync: open "/freecom/backup/home/chris/Mail/.in/audacity/cur/1172038263.69147_0.newred:2," failed: Input/output error (5)
    rsync: open "/freecom/backup/home/chris/Mail/.in/freecycle/cur/1172005922.70482_0.newred:2,S" failed: Input/output error (5)
    rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]

The files in the destination directory seem normal:-

    home$ ls -l /freecom/backup/home/chris/Mail/.in/audacity/cur
    total 36
    -rw------- 1 root root  8192 2007-12-10 20:40 1172007150.76430_0.newred:2,
    -rw------- 1 root root  8192 2007-12-10 20:40 1172012773.6188_0.newred:2,
    -rw------- 1 root root 12288 2007-12-10 20:40 1172032604.34523_0.newred:2,
    -rw------- 1 root root  8192 2007-12-10 20:40 1172038263.69147_0.newred:2,


So why is rsync having problems?

-- 
Chris Green


More information about the rsync mailing list