# problems with external hdd

## Adel Ahmed

I just bought a cheap external hdd, the hdd works fine on windows, is detected and can be written to, on Linux(both gentoo and rhel too) I get the following:

journalctl

Apr 25 22:41:54 b5400 kernel: usb 1-2: new high-speed USB device number 3 using xhci_hcd

Apr 25 22:41:54 b5400 kernel: usb-storage 1-2:1.0: USB Mass Storage device detected

Apr 25 22:41:54 b5400 kernel: scsi host7: usb-storage 1-2:1.0

Apr 25 22:41:54 b5400 mtp-probe[9681]: checking bus 1, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"

Apr 25 22:41:54 b5400 mtp-probe[9681]: bus: 1, device: 3 was not an MTP device

Apr 25 22:41:55 b5400 kernel: scsi 7:0:0:0: Direct-Access     Initio                    1.06 PQ: 0 ANSI: 0

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: Attached scsi generic sg3 type 0

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: [sdd] 3907029167 512-byte logical blocks: (2.00 TB/1.81 TiB)

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: [sdd] Write Protect is off

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: [sdd] Mode Sense: 23 00 00 00

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: [sdd] No Caching mode page found

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: [sdd] Assuming drive cache: write through

Apr 25 22:41:55 b5400 kernel:  sdd: sdd1

Apr 25 22:41:55 b5400 kernel: sd 7:0:0:0: [sdd] Attached SCSI disk

dmesg:

[  763.382600] usb 1-2: new high-speed USB device number 3 using xhci_hcd

[  763.550705] usb-storage 1-2:1.0: USB Mass Storage device detected

[  763.551140] scsi host7: usb-storage 1-2:1.0

[  764.553199] scsi 7:0:0:0: Direct-Access     Initio                    1.06 PQ: 0 ANSI: 0

[  764.553331] sd 7:0:0:0: Attached scsi generic sg3 type 0

[  764.553629] sd 7:0:0:0: [sdd] 3907029167 512-byte logical blocks: (2.00 TB/1.81 TiB)

[  764.554285] sd 7:0:0:0: [sdd] Write Protect is off

[  764.554288] sd 7:0:0:0: [sdd] Mode Sense: 23 00 00 00

[  764.555030] sd 7:0:0:0: [sdd] No Caching mode page found

[  764.555033] sd 7:0:0:0: [sdd] Assuming drive cache: write through

[  764.591101]  sdd: sdd1

[  764.592740] sd 7:0:0:0: [sdd] Attached SCSI disk

after a while:

[  795.770278] usb 1-2: reset high-speed USB device number 3 using xhci_hcd

[  795.934756] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880303dc19c0

[  795.934758] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880303dc1a08

and

[  981.560749] sd 7:0:0:0: [sdd]  

[  981.560752] Result: hostbyte=0x05 driverbyte=0x00

[  981.560754] sd 7:0:0:0: [sdd] CDB: 

[  981.560754] cdb[0]=0x28: 28 00 e8 e0 88 00 00 00 08 00

[  981.560760] blk_update_request: I/O error, dev sdd, sector 3907028992

[ 1123.702041] traps: notification-da[10029] trap int3 ip:7f5e687dd5a3 sp:7ffff60524d0 error:0

thanks

----------

## Adel Ahmed

bump

----------

## Adel Ahmed

help anyone?

----------

## kernelOfTruth

some information is needed:

motherboard name,

output of lsusb, lspci

what chipset is being used (usb 3.0)

name of the usb-case

kernel version

kernel settings (xhci related)

zgrep XHCI /proc/config.gz

zgrep USB /proc/config.gz

<-- both ideally on pastebin, otherwise the latter command would clutter the forum too much

related:

https://lists.debian.org/debian-kernel/2014/03/msg00153.html

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1371233

http://forums.debian.net/viewtopic.php?f=7&t=117061

----------

## Adel Ahmed

chipset usb3

if you're referring to the name on the enclosure it's samsung

kernel:

3.18.7-gentoo

system details:

http://pastebin.com/tNePDEB4

I don't have the kernel config option enabled so I dont have the /proc/config.gz

here's my kernel config:

http://pastebin.com/FPYe9vgH

thanks

----------

## Adel Ahmed

bump

----------

## kernelOfTruth

related:

https://bbs.archlinux.de/viewtopic.php?id=27022

<--

mentions that the external enclosure is correctly being recognized without harddrive

but *with* HDD -  that it after a while is being re-set

http://xxblx.blogspot.co.at/2014/10/hdd.html

<-- no problems reported here with that chipset

you tried the HDD on different USB ports ?

the same with usb2 and usb3 ports ?

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1348007

Any BIOS/UEFI settings that you could change related to XHCI ?

----------

## Adel Ahmed

tried all the usb ports on the laptop(2 and 3)

only 2 settings

usb3 mode(disaabled enabled and auto) tried all the settings

and another setting for uefi usb boot, which I tried enablign and disabling

no dice  :Sad: 

----------

## NeddySeagoon

Adel Ahmed,

Is this a bus powered USB HDD or does it have its own power brick?

Bus powered is bad news on USB2 but its better on USB3.

Try another USB3 cable between the drive and PC.

A USB1/2 cable will not connect to the drive

----------

## depontius

I had an external drive a while back (eSATA) and it would time out and disappear after a while.  I wrote a simple script with a loop that would touch an empty file on the drive every few minutes.  Then it was reliable.  I don't know why it timed out, I just worked around it with the script.

I now have a pair of external USB3 drives I'm using for backup.  But my cron job mounts a drive, does the backup, then unmounts it.  So timeout is never a potential issue.  (Even though the drive sits there most of the time, I figure it's safer unmounted.)

----------

