Bug 11578 - Rsync does start with an error directly connecting an USB drive to a port
Rsync does start with an error directly connecting an USB drive to a port
Status: RESOLVED FIXED
Product: rsync
Classification: Unclassified
Component: core
3.1.1
x64 Linux
: P2 minor
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-28 20:23 UTC by Armin Mohring
Modified: 2016-03-22 09:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Armin Mohring 2015-10-28 20:23:27 UTC

    
Comment 1 Armin Mohring 2015-10-28 20:28:55 UTC
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.
Comment 2 Kevin Korb 2015-10-28 20:30:46 UTC
There should be additional errors.  If not from rsync then from dmesg.
Comment 3 Armin Mohring 2015-10-28 20:37:53 UTC
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
Comment 4 Kevin Korb 2015-10-28 20:44:02 UTC
There are no device, block, or filesystem errors after that?
Comment 5 Armin Mohring 2015-10-28 21:03:45 UTC
I think I have found the error:

the usb 3.0 Hdd must be mounted first and then it can be acessed.
Comment 6 Armin Mohring 2015-10-31 18:47:38 UTC
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.
Comment 7 Kevin Korb 2015-10-31 20:03:47 UTC
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.
Comment 8 Armin Mohring 2015-10-31 20:10:10 UTC
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.
Comment 9 Kevin Korb 2015-10-31 20:43:06 UTC
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.