My setup is:
- Raspberry Pi 3
- powered by cable "Raspberry Pi 3 Power adapter UK/EU 5V 2.5A"
- External 3.5 inch hard drive "WD Blue 1TB Desktop Hard Disk Drive"
- in an external hard drive case "CiT 3.5 inch USB 2.0 SATA and IDE HDD Enclosure"
So both the raspberry and the hard drive have their own dedicated power cable, connected to a wall socket. They are connected via USB.
As soon as I start to heavily use the hard drive, it disconnects after ~5-10 minutes and won't automatically remount. This only happens when connecting it to the raspberry PI, if I connect the drive to my computer I have no problems at all.
Here are the dmesg logs:
[ 182.730855] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 259.161616] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 265.012137] usb 1-1.3: USB disconnect, device number 4
[ 265.031736] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[ 265.031767] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 02 af ef c1 00 00 09 00
[ 265.031782] blk_update_request: I/O error, dev sda, sector 45084609
[ 265.031797] Buffer I/O error on dev sda2, logical block 44672961, lost async page write
[ 265.031814] Buffer I/O error on dev sda2, logical block 44672962, lost async page write
[ 265.031827] Buffer I/O error on dev sda2, logical block 44672963, lost async page write
[ 265.031841] Buffer I/O error on dev sda2, logical block 44672964, lost async page write
[ 265.031855] Buffer I/O error on dev sda2, logical block 44672965, lost async page write
[ 265.032116] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[ 265.032135] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 01 96 be 66 00 00 10 00
[ 265.032147] blk_update_request: I/O error, dev sda, sector 26656358
[ 265.472045] FAT-fs (sda2): unable to read inode block for updating (i_pos 7726319)
[ 265.472078] FAT-fs (sda2): unable to read inode block for updating (i_pos 7628013)
[ 265.472094] FAT-fs (sda2): unable to read inode block for updating (i_pos 7628011)
[ 268.565800] FAT-fs (sda2): Directory bread(block 476750) failed
[ 268.565830] FAT-fs (sda2): Directory bread(block 476751) failed
[ 268.565848] FAT-fs (sda2): Directory bread(block 476752) failed
[ 268.565866] FAT-fs (sda2): Directory bread(block 476753) failed
[ 268.565884] FAT-fs (sda2): Directory bread(block 476754) failed
[ 268.565902] FAT-fs (sda2): Directory bread(block 476755) failed
[ 268.565919] FAT-fs (sda2): Directory bread(block 476756) failed
[ 268.565937] FAT-fs (sda2): Directory bread(block 476757) failed
[ 268.565954] FAT-fs (sda2): Directory bread(block 476758) failed
[ 268.565972] FAT-fs (sda2): Directory bread(block 476759) failed
[ 277.011792] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[ 277.112585] usb 1-1.3: New USB device found, idVendor=152d, idProduct=2338
[ 277.112607] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 277.112621] usb 1-1.3: Product: USB to ATA/ATAPI bridge
[ 277.112633] usb 1-1.3: Manufacturer: JMicron
[ 277.112645] usb 1-1.3: SerialNumber: 000000001CC6
[ 277.115640] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 277.116022] scsi host1: usb-storage 1-1.3:1.0
[ 278.182619] scsi 1:0:0:0: Direct-Access WDC WD10 EZEX-21WN4A0 PQ: 0 ANSI: 5
[ 278.184473] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 278.184866] sd 1:0:0:0: [sdb] Write Protect is off
[ 278.184887] sd 1:0:0:0: [sdb] Mode Sense: 28 00 00 00
[ 278.184897] sd 1:0:0:0: Attached scsi generic sg0 type 0
[ 278.185252] sd 1:0:0:0: [sdb] No Caching mode page found
[ 278.185269] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[ 278.249063] sdb: sdb1 sdb2
[ 278.251530] sd 1:0:0:0: [sdb] Attached SCSI disk
EDIT: some more logs:
[ 1969.096956] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 1974.947496] usb 1-1.3: USB disconnect, device number 4
[ 1974.957333] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[ 1974.957362] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 03 8a 51 0a 00 00 1b 00
[ 1974.957378] blk_update_request: I/O error, dev sda, sector 59396362
[ 1974.957392] Buffer I/O error on dev sda2, logical block 58984714, lost async page write
[ 1974.957407] Buffer I/O error on dev sda2, logical block 58984715, lost async page write
[ 1974.957421] Buffer I/O error on dev sda2, logical block 58984716, lost async page write
[ 1974.957434] Buffer I/O error on dev sda2, logical block 58984717, lost async page write
[ 1975.037277] FAT-fs (sda2): FAT read failed (blocknr 32)
[ 1975.416667] FAT-fs (sda2): Directory bread(block 482894) failed
[ 1975.416684] FAT-fs (sda2): Directory bread(block 482895) failed
[ 1975.416694] FAT-fs (sda2): Directory bread(block 482896) failed
[ 1975.416703] FAT-fs (sda2): Directory bread(block 482897) failed
[ 1975.416712] FAT-fs (sda2): Directory bread(block 482898) failed
[ 1975.416720] FAT-fs (sda2): Directory bread(block 482899) failed
[ 1975.416729] FAT-fs (sda2): Directory bread(block 482900) failed
[ 1975.416738] FAT-fs (sda2): Directory bread(block 482901) failed
[ 1975.416747] FAT-fs (sda2): Directory bread(block 482902) failed
[ 1975.416756] FAT-fs (sda2): Directory bread(block 482903) failed
information about my OS:
pi@raspnode:~ $ uname -a
Linux raspnode 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
pi@raspnode:~ $ lsb_release -irc
Distributor ID: Raspbian
Release: 8.0
Codename: jessie