Input/output error when copying files between usb hdd

Post Reply
GaLkI
Posts: 6
Joined: Tue Jun 11, 2019 9:38 pm
languages_spoken: english, spanish
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Input/output error when copying files between usb hdd

Unread post by GaLkI » Wed Jun 12, 2019 12:02 am

Hi,

I have a problem with my odroid n2.

I have 2 usb 3.0 hdd 3.5"

When I try copy big files between them, the system give me the next error:

Code: Select all

cp: error reading 'ncserver_3.tar.gz': Input/output error
Then the disks are inaccessible until I restart

dmesg give me the next info

Code: Select all

[  954.852519] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  954.852535] xhci-hcd xhci-hcd.0.auto: Assuming host is dying, halting host.
[  954.872121] xhci-hcd xhci-hcd.0.auto: Host not halted after 16000 microseconds.
[  954.872127] xhci-hcd xhci-hcd.0.auto: Non-responsive xHCI host is not halting.
[  954.872133] xhci-hcd xhci-hcd.0.auto: Completing active URBs anyway.
[  954.873220] hub 2-1:1.0: hub_ext_port_status failed (err = -108)
[  954.873236] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  954.875687] usb 1-1: USB disconnect, device number 2
[  954.875701] usb 1-1.4: USB disconnect, device number 5
[  954.876061] usb 2-1: USB disconnect, device number 2
[  954.876069] usb 2-1.1: USB disconnect, device number 4
[  954.888725] blk_update_request: I/O error, dev sdb, sector 8911121408
[  954.890298] blk_update_request: I/O error, dev sdb, sector 8911121920
[  954.896916] blk_update_request: I/O error, dev sdb, sector 8911121408
[  954.927713] usb 2-1.2: USB disconnect, device number 5
[  954.932466] blk_update_request: I/O error, dev sdc, sector 986632440
[  954.933414] blk_update_request: I/O error, dev sdc, sector 984644312
[  954.940290] blk_update_request: I/O error, dev sdc, sector 988099448
[  954.948279] blk_update_request: I/O error, dev sdc, sector 988099488
[  954.952506] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  954.952514] sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 cb 80 00 00 08 00 00
[  954.952518] blk_update_request: I/O error, dev sda, sector 13336576
[  954.952527] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 2101248 starting block 1667328)
[  954.952531] Buffer I/O error on device sda, logical block 1667072
[  954.952541] Buffer I/O error on device sda, logical block 1667073
[  954.952543] Buffer I/O error on device sda, logical block 1667074
[  954.952546] Buffer I/O error on device sda, logical block 1667075
[  954.952548] Buffer I/O error on device sda, logical block 1667076
[  954.952551] Buffer I/O error on device sda, logical block 1667077
[  954.952553] Buffer I/O error on device sda, logical block 1667078
[  954.952556] Buffer I/O error on device sda, logical block 1667079
[  954.952558] Buffer I/O error on device sda, logical block 1667080
[  954.952561] Buffer I/O error on device sda, logical block 1667081
[  955.021803] blk_update_request: I/O error, dev sdc, sector 988099520
[  955.028293] blk_update_request: I/O error, dev sdc, sector 988099576
[  955.034707] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  955.034713] sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 cb 88 00 00 08 00 00
[  955.034724] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 3149824 starting block 1667584)
[  955.061406] usb 2-1.3: USB disconnect, device number 3
[  955.068476] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 4198400 starting block 1667840)
[  955.069179] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 5246976 starting block 1668096)
[  955.069877] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 6295552 starting block 1668352)
[  955.070324] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 7344128 starting block 1668608)
[  955.070782] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 8388608 starting block 1668864)
[  955.072163] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 578813952 size 8388608 starting block 1669120)
[  955.073240] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 587202560 size 2101248 starting block 1669376)
[  955.074149] EXT4-fs warning (device sda): ext4_end_bio:313: I/O error -5 writing to inode 14 (offset 587202560 size 3149824 starting block 1669632)
[  955.088606] JBD2: Detected IO errors while flushing file data on sda-8
[  955.088629] Aborting journal on device sda-8.
[  955.088709] Buffer I/O error on dev sda, logical block 60850176, lost sync page write
[  955.095666] Buffer I/O error on dev sda, logical block 0, lost sync page write
[  955.095928] JBD2: Error -5 detected when updating journal superblock for sda-8.
[  955.095969] JBD2: Detected IO errors while flushing file data on sda-8
[  955.108421] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command.
[  955.108424] xhci-hcd xhci-hcd.0.auto: Assuming host is dying, halting host.
[  955.108450] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
[  955.116104] EXT4-fs error (device sda): ext4_journal_check_start:56: Detected aborted journal
[  955.125113] EXT4-fs (sda): Remounting filesystem read-only
[  955.130746] EXT4-fs (sda): previous I/O error to superblock detected
[  955.136885] Buffer I/O error on dev sda, logical block 0, lost sync page write
[  955.144193] EXT4-fs (sda): ext4_writepages: jbd2_start: 9223372036854775807 pages, ino 14; err -30
[  955.633888] EXT4-fs warning (device sdc1): dx_probe:743: inode #125: lblock 0: comm transmission-da: error -5 reading directory block
[  955.633986] EXT4-fs error (device sdc1): ext4_find_entry:1441: inode #124: comm transmission-da: reading directory lblock 0
[  955.640514] Aborting journal on device sdc1-8.
[  955.644536] Buffer I/O error on dev sdc1, logical block 488144896, lost sync page write
[  955.652664] JBD2: Error -5 detected when updating journal superblock for sdc1-8.
[  955.660191] EXT4-fs (sdc1): Remounting filesystem read-only
[  955.665947] EXT4-fs warning (device sdc1): dx_probe:743: inode #125: lblock 0: comm transmission-da: error -5 reading directory block
[  955.669714] EXT4-fs error (device sdc1): ext4_find_entry:1441: inode #2: comm gvfsd-trash: reading directory lblock 0
[  955.676712] EXT4-fs error (device sdc1): ext4_find_entry:1441: inode #2: comm gvfsd-trash: reading directory lblock 0
[  955.937989] EXT4-fs warning (device sdc1): dx_probe:743: inode #125: lblock 0: comm transmission-da: error -5 reading directory block
[  955.938127] EXT4-fs warning (device sdc1): dx_probe:743: inode #125: lblock 0: comm transmission-da: error -5 reading directory block
[  957.953226] EXT4-fs warning (device sdc1): dx_probe:743: inode #958466: lblock 0: comm transmission-da: error -5 reading directory block
[  957.953425] EXT4-fs warning (device sdc1): dx_probe:743: inode #958466: lblock 0: comm transmission-da: error -5 reading directory block
[  957.953520] EXT4-fs warning (device sdc1): dx_probe:743: inode #958466: lblock 0: comm transmission-da: error -5 reading directory block
[  957.953617] EXT4-fs warning (device sdc1): dx_probe:743: inode #958466: lblock 0: comm transmission-da: error -5 reading directory block
[  957.953700] EXT4-fs warning (device sdc1): dx_probe:743: inode #958466: lblock 0: comm transmission-da: error -5 reading directory block
[  957.953799] EXT4-fs warning (device sdc1): dx_probe:743: inode #958466: lblock 0: comm transmission-da: error -5 reading directory block
Thanks for help and sorry for my bad english

User avatar
tobetter
Posts: 3791
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 29 times
Been thanked: 130 times
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by tobetter » Wed Jun 12, 2019 1:30 am

There is some activity for the same/similar issue, please keep looking at the thread as well.
viewtopic.php?f=181&t=35129

GaLkI
Posts: 6
Joined: Tue Jun 11, 2019 9:38 pm
languages_spoken: english, spanish
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by GaLkI » Thu Jun 13, 2019 6:15 am

I have run the test one hour and I dont have had any problem

The problem occurs when I copy large files between hdd.
When writing in 1 disk i dont have problems

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by odroid » Thu Jun 13, 2019 9:10 am

Try this workaround and let us know the result.
viewtopic.php?f=181&t=35129#p259181

GaLkI
Posts: 6
Joined: Tue Jun 11, 2019 9:38 pm
languages_spoken: english, spanish
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by GaLkI » Fri Jun 14, 2019 6:34 am

I try workaround but the problem persists

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by odroid » Fri Jun 14, 2019 12:38 pm

If your external USB 3.0 storage has a UAS compatibility issue with Linux, you have to disable it.
Please try "quirks" option to disable the UAS mode.
viewtopic.php?f=181&t=35031

GaLkI
Posts: 6
Joined: Tue Jun 11, 2019 9:38 pm
languages_spoken: english, spanish
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by GaLkI » Fri Jun 14, 2019 4:46 pm

I think that always have usb-storage driver

Code: Select all

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 1: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        |__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
¿is correct?

When I try to move small files it works but when I try to move large files or folders (in this case 66 gb) the system crashes

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by odroid » Mon Jun 17, 2019 12:16 pm

Right. You are not using the UAS driver.

BTW, are you running Kernel 4.9.170 or higher?

GaLkI
Posts: 6
Joined: Tue Jun 11, 2019 9:38 pm
languages_spoken: english, spanish
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by GaLkI » Mon Jun 17, 2019 4:48 pm

The kernel version is 4.9.180-30

User avatar
odroid
Site Admin
Posts: 31852
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 255 times
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by odroid » Mon Jun 17, 2019 5:35 pm

Okay.

Please double check the reduced queue size again. Both values must be 32.

Code: Select all

cat /sys/class/block/sda/queue/max_sectors_kb 
cat /sys/class/block/sdb/queue/max_sectors_kb 
Also it is very worth to clean the USB 3.0 host connectors just in case.
viewtopic.php?f=147&t=30446&p=218401#p218401

GaLkI
Posts: 6
Joined: Tue Jun 11, 2019 9:38 pm
languages_spoken: english, spanish
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by GaLkI » Thu Jun 20, 2019 11:13 pm

Sorry for the delay
The workaround changin max_sectors_kb value, makes the system more stable, but the problem persist

If you need more info or output command, you say me

User avatar
mad_ady
Posts: 6401
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 150 times
Been thanked: 109 times
Contact:

Re: Input/output error when copying files between usb hdd

Unread post by mad_ady » Fri Jun 21, 2019 1:08 am

You can reduce the number further until your system becomes stable.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests