LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB drive keeps 'disconnecting' in middle of transfer (all drives/cables/enclosures!) (https://www.linuxquestions.org/questions/linux-hardware-18/usb-drive-keeps-disconnecting-in-middle-of-transfer-all-drives-cables-enclosures-4175459135/)

veeruk101 04-22-2013 09:45 AM

USB drive keeps 'disconnecting' in middle of transfer (all drives/cables/enclosures!)
 
I have attached a 1TB SATA ext4 drive to my laptop and it goes to /dev/sdb. I start transferring several files to it, and it disconnects for some strange reason and reconnects to /dev/sdc. I unmount the filesystem from /dev/sdb and remount to /dev/sdc. But then after a while it disconnects and reconnects either back to /dev/sdb or to /dev/sdd, and the process continues. What could be the problem?

I've tried isolating the problem, but I'm out of options. I've tried different hard drives, different USB cables, different USB enclosures, different operating systems (CentOS 5 and Ubuntu 12.10), and whether the drive is encrypted or not, so I'm thinking maybe I'm doing something wrong. But I just do 'sudo mount /dev/sdb1 /mymountpoint'. Sometimes it works for a long time, and other times every few minutes I need to reconnect it, and it still continues to disconnect.

Do you have any idea what might be wrong, or how I can further diagnose the problem? I think the hardware is fine, because it happens with different combinations of drives/cables/enclosures/etc, so I'm not sure where to go from here.

Here are 2 dmesg outputs. This first one is the end of the output after the device connects successfully.

Code:

[Sun Apr 21 12:14:22 2013] EXT4-fs error (device sdb1): ext4_find_entry:1209: inode #9830402: comm java: reading directory lblock 0
[Sun Apr 21 12:15:40 2013] EXT4-fs error (device sdb1): ext4_wait_block_bitmap:445: comm umount: Cannot read block bitmap - block_group = 697, block_bitmap = 22544393
[Sun Apr 21 12:15:40 2013] EXT4-fs error (device sdb1): ext4_discard_preallocations:3837: comm umount: Error reading block bitmap for 697
[Sun Apr 21 12:15:40 2013] EXT4-fs error (device sdb1): ext4_put_super:887: Couldn't clean up the journal
[Sun Apr 21 12:15:46 2013] EXT4-fs (sdc1): recovery complete
[Sun Apr 21 12:15:46 2013] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)

This output is what happens from the end of the above output after the device disconnects.

Code:

[Sun Apr 21 12:24:40 2013] usb 4-2: USB disconnect, device number 14
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055821
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055822
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055823
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055824
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055825
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055826
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055827
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055828
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 24055829
[Sun Apr 21 12:24:40 2013] EXT4-fs warning (device sdc1): ext4_end_bio:248: I/O error writing to inode 9830448 (offset 53248 size 36864 starting block 24055837)
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 33824
[Sun Apr 21 12:24:40 2013] EXT4-fs warning (device sdc1): ext4_end_bio:248: I/O error writing to inode 9830414 (offset 0 size 4096 starting block 33832)
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 33876
[Sun Apr 21 12:24:40 2013] EXT4-fs warning (device sdc1): ext4_end_bio:248: I/O error writing to inode 9830414 (offset 212992 size 4096 starting block 33884)
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159680
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159681
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159682
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159683
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159684
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159685
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159686
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159687
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159688
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159689
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159690
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159691
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159692
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159693
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159694
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159695
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159696
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159697
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 25159698
[Sun Apr 21 12:24:40 2013] EXT4-fs warning (device sdc1): ext4_end_bio:248: I/O error writing to inode 9830452 (offset 0 size 77824 starting block 25159706)
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 26288128
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 26288129
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 26288130
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 26288131
[Sun Apr 21 12:24:40 2013] Buffer I/O error on device sdc1, logical block 26288132
[Sun Apr 21 12:24:40 2013] EXT4-fs warning (device sdc1): ext4_end_bio:248: I/O error writing to inode 9830456 (offset 0 size 20480 starting block 26288140)
[Sun Apr 21 12:24:40 2013] sd 18:0:0:0: [sdc] Unhandled error code
[Sun Apr 21 12:24:40 2013] sd 18:0:0:0: [sdc] 
[Sun Apr 21 12:24:40 2013] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[Sun Apr 21 12:24:40 2013] sd 18:0:0:0: [sdc] CDB:
[Sun Apr 21 12:24:40 2013] Read(10): 28 00 0c 8f 77 97 00 00 08 00
[Sun Apr 21 12:24:40 2013] end_request: I/O error, dev sdc, sector 210728855
[Sun Apr 21 12:24:40 2013] Aborting journal on device sdc1-8.
[Sun Apr 21 12:24:40 2013] JBD2: Error -5 detected when updating journal superblock for sdc1-8.
[Sun Apr 21 12:24:40 2013] journal commit I/O error
[Sun Apr 21 12:24:40 2013] EXT4-fs error (device sdc1): ext4_journal_start_sb:371: Detected aborted journal
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): Remounting filesystem read-only
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): previous I/O error to superblock detected
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): previous I/O error to superblock detected
[Sun Apr 21 12:24:40 2013] EXT4-fs error (device sdc1): __ext4_get_inode_loc:3629: inode #9830435: block 39321634: comm java: unable to read itable block
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): previous I/O error to superblock detected
[Sun Apr 21 12:24:40 2013] EXT4-fs error (device sdc1): ext4_find_entry:1209: inode #9830402: comm java: reading directory lblock 0
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): previous I/O error to superblock detected
[Sun Apr 21 12:24:40 2013] EXT4-fs error (device sdc1): ext4_find_entry:1209: inode #9830402: comm java: reading directory lblock 0
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): previous I/O error to superblock detected
[Sun Apr 21 12:24:40 2013] EXT4-fs error (device sdc1): ext4_find_entry:1209: inode #9830402: comm java: reading directory lblock 0
[Sun Apr 21 12:24:40 2013] EXT4-fs (sdc1): previous I/O error to superblock detected
[Sun Apr 21 12:24:40 2013] EXT4-fs error (device sdc1): ext4_find_entry:1209: inode #9830402: comm java: reading directory lblock 0
[Sun Apr 21 12:24:41 2013] usb 4-2: new SuperSpeed USB device number 15 using xhci_hcd
[Sun Apr 21 12:24:41 2013] usb 4-2: Parent hub missing LPM exit latency info.  Power management will be impacted.
[Sun Apr 21 12:24:41 2013] usb 4-2: New USB device found, idVendor=174c, idProduct=55aa
[Sun Apr 21 12:24:41 2013] usb 4-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[Sun Apr 21 12:24:41 2013] usb 4-2: Product: 012345678901234567890123456789012345678901234567
[Sun Apr 21 12:24:41 2013] usb 4-2: Manufacturer: 01234567890123456789012345678901234567890123
[Sun Apr 21 12:24:41 2013] usb 4-2: SerialNumber: 0123456789ABCDEF0132
[Sun Apr 21 12:24:41 2013] scsi19 : usb-storage 4-2:1.0
[Sun Apr 21 12:24:42 2013] scsi 19:0:0:0: Direct-Access    ST310005 28AS            CC38 PQ: 0 ANSI: 0
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: Attached scsi generic sg2 type 0
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] Write Protect is off
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] Mode Sense: 23 00 00 00
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] No Caching mode page present
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] No Caching mode page present
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[Sun Apr 21 12:24:42 2013]  sdb: sdb1
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] No Caching mode page present
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] Assuming drive cache: write through
[Sun Apr 21 12:24:42 2013] sd 19:0:0:0: [sdb] Attached SCSI disk
[Sun Apr 21 12:26:01 2013] usb 4-2: USB disconnect, device number 15
[Sun Apr 21 12:26:01 2013] usb 4-2: new SuperSpeed USB device number 16 using xhci_hcd
[Sun Apr 21 12:26:01 2013] usb 4-2: Parent hub missing LPM exit latency info.  Power management will be impacted.
[Sun Apr 21 12:26:01 2013] usb 4-2: New USB device found, idVendor=174c, idProduct=55aa
[Sun Apr 21 12:26:01 2013] usb 4-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[Sun Apr 21 12:26:01 2013] usb 4-2: Product: 012345678901234567890123456789012345678901234567
[Sun Apr 21 12:26:01 2013] usb 4-2: Manufacturer: 01234567890123456789012345678901234567890123
[Sun Apr 21 12:26:01 2013] usb 4-2: SerialNumber: 0123456789ABCDEF0132
[Sun Apr 21 12:26:01 2013] scsi20 : usb-storage 4-2:1.0
[Sun Apr 21 12:26:02 2013] scsi 20:0:0:0: Direct-Access    ST310005 28AS            CC38 PQ: 0 ANSI: 0
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: Attached scsi generic sg2 type 0
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] Write Protect is off
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] Mode Sense: 23 00 00 00
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] No Caching mode page present
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] Assuming drive cache: write through
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] No Caching mode page present
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] Assuming drive cache: write through
[Sun Apr 21 12:26:02 2013]  sdb: sdb1
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] No Caching mode page present
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] Assuming drive cache: write through
[Sun Apr 21 12:26:02 2013] sd 20:0:0:0: [sdb] Attached SCSI disk


cynwulf 04-22-2013 09:49 AM

Is the drive installed in an enclosure which is self powered (by an external transformer) or hub powered (by the USB)?

2 1/2" or 3 1/2" drive?

veeruk101 04-22-2013 09:59 AM

Quote:

Originally Posted by caravel (Post 4936526)
Is the drive installed in an enclosure which is self powered (by an external transformer) or hub powered (by the USB)?

2 1/2" or 3 1/2" drive?

All the drives I've tried this with are 3 1/2" and the enclosures have 2 connections, one to the USB of the laptop and the other to the power outlet.

cynwulf 04-22-2013 10:26 AM

The question remains: Are you running the device bus powered or self powered?

Some enclosures have a switch, others don't (none of mine have a switch) to switch the power source. If so ensure that the switch is flicked over to self powered mode.

Ensure you're using a proper USB 2.0 cable. Test the drive + enclosure in another machine before you start thinking about faulty drive electronics.


All times are GMT -5. The time now is 08:31 PM.