0

usually we not have this issue so its very rare!

but today we got the following error when we are using rsync to copy files . when files - pkg_gh are with 1-3G size

the error is like this

Warning: Permanently added '130.33.90.18' (ECDSA) to the list of known hosts.
rsync: read errors mapping "/target/home_l/repo/pkg_gh": Bad file descriptor (9)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

what is the meaning when we get - Bad file descriptor , when using rsync?

is it something that we can avoid?

for example kernel settings? or rsync rpm upgrade? etc ?

the cmd is like this

sshpass XXXXXX /usr/bin/rsync --delay-updates -F --archive --rsh=/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null  --out-format=.....  /target/home_l/repo/pkg_gh root:$target_server:/tmp/local_folder

and the rsync is working between two rhel server from local server to target server , when server are connected VIA Cisco switch

2
  • Is /target/home_l/repo/pgk_gh on a network share (NFS or SMB/CIFS, for example)?
    – roaima
    May 5, 2021 at 21:33
  • its NFS network filesystem
    – sheffadmin
    May 6, 2021 at 1:09

1 Answer 1

0

The error message indicates a read error, not a write error

rsync: read errors mapping "/target/home_l/repo/pkg_gh": Bad file descriptor (9)

You confirmed in a comment that your source file is on an NFS filesystem, and it's here that the read write occurred. Your NFS file system momentarily failed to deliver part of the file that rsync was copying.

2
  • any comment hot to avoid this issue ?
    – sheffadmin
    May 6, 2021 at 6:30
  • Rerun the rsync with the --partial flag to keep partially transferred files. If it fails again talk to your sysadmins about the repeated NFS failure
    – roaima
    May 6, 2021 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.