error output: rsync error: error in file io (code 11) at main.c (656) [Receiver=3.1.1] This error occurs, when I connect an USB drive [USB HDD, 2TB) to an USB 3.0 port and try to start an incremental file transfer.
There should be additional errors. If not from rsync then from dmesg.
This is the relevant part from dmesg after connecting the drive to an USB 3.0 port: 5773.601144] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [ 5777.829686] usb 4-3: new SuperSpeed USB device number 6 using xhci_hcd [ 5777.841134] usb 4-3: New USB device found, idVendor=0bc2, idProduct=3320 [ 5777.841139] usb 4-3: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [ 5777.841142] usb 4-3: Product: Expansion Desk [ 5777.841144] usb 4-3: Manufacturer: Seagate [ 5777.841146] usb 4-3: SerialNumber: NA4MVF15 [ 5777.843264] scsi8 : uas [ 5777.843690] scsi 8:0:0:0: Direct-Access Seagate Expansion Desk 0712 PQ: 0 ANSI: 6 [ 5777.844184] sd 8:0:0:0: Attached scsi generic sg8 type 0 [ 5777.844251] sd 8:0:0:0: [sdh] Spinning up disk... [ 5778.843059] .......ready [ 5784.839976] sd 8:0:0:0: [sdh] 488378645 4096-byte logical blocks: (2.00 TB/1.81 TiB) [ 5784.857762] sd 8:0:0:0: [sdh] Write Protect is off [ 5784.857767] sd 8:0:0:0: [sdh] Mode Sense: 4f 00 00 00 [ 5784.857935] sd 8:0:0:0: [sdh] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 5784.858486] sd 8:0:0:0: [sdh] 488378645 4096-byte logical blocks: (2.00 TB/1.81 TiB) [ 5784.881361] sdh: sdh1 [ 5784.881816] sd 8:0:0:0: [sdh] 488378645 4096-byte logical blocks: (2.00 TB/1.81 TiB) [ 5784.882346] sd 8:0:0:0: [sdh] Attached SCSI disk
There are no device, block, or filesystem errors after that?
I think I have found the error: the usb 3.0 Hdd must be mounted first and then it can be acessed.
Rsync does not detect, if a drive is not mounted. In my case: I have an external USB3.0 drive with 2TB. If the drive is not mounted, the following error occurs: rsync error: error in file io (code 11) at main.c (656) [Receiver=3.1.1] Improvemnt suggestion: Rsync should detect, if the drive is mounted or not.
Rsync has no idea (or way) to know that you are trying to rsync to a separate disk. You give it a source and a target and it uses what is there. If you need to check for a mounted filesystem then you want a wrapper script.
Why should rsync that know. There is an error, if the specified folder does not exist. Could be an external disk or partition or something else.
You have no idea how many people would complain if rsync didn't create a non-existing target directory. It is already a very common complaint that rsync won't create more than one deep.