Page 1 of 1

Trouble mounting USB hard drive

Posted: Mon Sep 24, 2012 11:20 am
by stretched
Hi,

I'm having a problem trying to mount a USB HDD on my pi, running Raspbian 2009-09-18 release. The HDD is connected via a powered USB hub. I've verified that the device works correctly, e.g. on my Ubuntu desktop it all works just fine.

The kernel sees the device appear as a SCSI generic device, but never as a block device. I'm looking for advice on what to try next to figure out why this isn't working.

This is from /var/log/messages

Code: Select all

Sep 24 20:54:23 raspberrypi kernel: [  165.864841] usb 1-1.3.1.1: new high-speed USB device number 11 using dwc_otg
Sep 24 20:54:23 raspberrypi kernel: [  165.966822] usb 1-1.3.1.1: New USB device found, idVendor=0411, idProduct=01de
Sep 24 20:54:23 raspberrypi kernel: [  165.966842] usb 1-1.3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 24 20:54:23 raspberrypi kernel: [  165.966858] usb 1-1.3.1.1: Product: HD-PCTU3
Sep 24 20:54:23 raspberrypi kernel: [  165.966870] usb 1-1.3.1.1: Manufacturer: BUFFALO
Sep 24 20:54:23 raspberrypi kernel: [  165.966882] usb 1-1.3.1.1: SerialNumber: B252710359
Sep 24 20:54:23 raspberrypi kernel: [  165.980568] scsi0 : usb-storage 1-1.3.1.1:1.0
Sep 24 20:54:25 raspberrypi kernel: [  168.475479] scsi 0:0:0:0: Direct-Access     BUFFALO  HD-PCTU3         0001 PQ: 1 ANSI: 6
Sep 24 20:54:25 raspberrypi kernel: [  168.549971] scsi 0:0:0:0: Attached scsi generic sg0 type 0
And the more detailed output from dmesg (I re-built the kernel with the usb-storage debug logging enabled):

Code: Select all

[  165.632465] hub 1-1.3.1:1.0: state 7 ports 4 chg 0000 evt 0002
[  165.632985] hub 1-1.3.1:1.0: port 1, status 0101, change 0001, 12 Mb/s
[  165.784824] hub 1-1.3.1:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
[  165.864841] usb 1-1.3.1.1: new high-speed USB device number 11 using dwc_otg
[  165.966084] usb 1-1.3.1.1: default language 0x0409
[  165.966799] usb 1-1.3.1.1: udev 11, busnum 1, minor = 10
[  165.966822] usb 1-1.3.1.1: New USB device found, idVendor=0411, idProduct=01de
[  165.966842] usb 1-1.3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  165.966858] usb 1-1.3.1.1: Product: HD-PCTU3
[  165.966870] usb 1-1.3.1.1: Manufacturer: BUFFALO
[  165.966882] usb 1-1.3.1.1: SerialNumber: B252710359
[  165.973371] usb 1-1.3.1.1: usb_probe_device
[  165.973414] usb 1-1.3.1.1: configuration #1 chosen from 1 choice
[  165.973718] usb 1-1.3.1.1: adding 1-1.3.1.1:1.0 (config #1, interface 0)
[  165.974009] uas 1-1.3.1.1:1.0: usb_probe_interface
[  165.974033] uas 1-1.3.1.1:1.0: usb_probe_interface - got id
[  165.974143] usb-storage 1-1.3.1.1:1.0: usb_probe_interface
[  165.974192] usb-storage 1-1.3.1.1:1.0: usb_probe_interface - got id
[  165.974211] usb-storage: USB Mass Storage device detected
[  165.980285] usb-storage: -- associate_dev
[  165.980315] usb-storage: Vendor: 0x0411, Product: 0x01de, Revision: 0x0001
[  165.980331] usb-storage: Interface Subclass: 0x06, Protocol: 0x50
[  165.980353] usb-storage: Transport: Bulk
[  165.980364] usb-storage: Protocol: Transparent SCSI
[  165.980568] scsi0 : usb-storage 1-1.3.1.1:1.0
[  165.981139] usb-storage 1-1.3.1.1:1.0: waiting for device to settle before scanning
[  165.981754] hub 1-1.3.1:1.0: state 7 ports 4 chg 0000 evt 0002
[  165.981828] usb-storage: *** thread sleeping.
[  166.974617] usb-storage 1-1.3.1.1:1.0: starting scan
[  166.974657] usb-storage: usb_stor_control_msg: rq=fe rqtype=a1 value=0000 index=00 len=1
[  166.974923] usb-storage: GetMaxLUN command result is 1, data is 0
[  166.975150] usb-storage: queuecommand_lck called
[  166.975201] usb-storage: *** thread awakened.
[  166.975221] usb-storage: Command INQUIRY (6 bytes)
[  166.975232] usb-storage:  12 00 00 00 24 00
[  166.975263] usb-storage: Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
[  166.975281] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
[  168.474645] usb-storage: Status code 0; transferred 31/31
[  168.474668] usb-storage: -- transfer complete
[  168.474680] usb-storage: Bulk command transfer result=0
[  168.474698] usb-storage: usb_stor_bulk_transfer_sglist: xfer 36 bytes, 1 entries
[  168.474938] usb-storage: Status code 0; transferred 36/36
[  168.474953] usb-storage: -- transfer complete
[  168.474966] usb-storage: Bulk data transfer result 0x0
[  168.474977] usb-storage: Attempting to get CSW...
[  168.474990] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
[  168.475173] usb-storage: Status code 0; transferred 13/13
[  168.475189] usb-storage: -- transfer complete
[  168.475201] usb-storage: Bulk status result = 0
[  168.475217] usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
[  168.475235] usb-storage: scsi cmd done, result=0x0
[  168.475258] usb-storage: *** thread sleeping.
[  168.475479] scsi 0:0:0:0: Direct-Access     BUFFALO  HD-PCTU3         0001 PQ: 1 ANSI: 6
[  168.476617] usb-storage: queuecommand_lck called
[  168.476676] usb-storage: *** thread awakened.
[  168.476695] usb-storage: Bad LUN (0:1)
[  168.476707] usb-storage: scsi cmd done, result=0x40000
[  168.476728] usb-storage: *** thread sleeping.
[  168.476991] usb-storage: queuecommand_lck called
[  168.477036] usb-storage: *** thread awakened.
[  168.477055] usb-storage: Bad target number (1:0)
[  168.477066] usb-storage: scsi cmd done, result=0x40000
[  168.477085] usb-storage: *** thread sleeping.
[  168.477302] usb-storage: queuecommand_lck called
[  168.477347] usb-storage: *** thread awakened.
[  168.477364] usb-storage: Bad target number (2:0)
[  168.477376] usb-storage: scsi cmd done, result=0x40000
[  168.477394] usb-storage: *** thread sleeping.
[  168.477606] usb-storage: queuecommand_lck called
[  168.477649] usb-storage: *** thread awakened.
[  168.477666] usb-storage: Bad target number (3:0)
[  168.477678] usb-storage: scsi cmd done, result=0x40000
[  168.477697] usb-storage: *** thread sleeping.
[  168.477907] usb-storage: queuecommand_lck called
[  168.477949] usb-storage: *** thread awakened.
[  168.477966] usb-storage: Bad target number (4:0)
[  168.477978] usb-storage: scsi cmd done, result=0x40000
[  168.477996] usb-storage: *** thread sleeping.
[  168.480791] usb-storage: queuecommand_lck called
[  168.480848] usb-storage: *** thread awakened.
[  168.480864] usb-storage: Bad target number (5:0)
[  168.480877] usb-storage: scsi cmd done, result=0x40000
[  168.480897] usb-storage: *** thread sleeping.
[  168.481121] usb-storage: queuecommand_lck called
[  168.481164] usb-storage: *** thread awakened.
[  168.481180] usb-storage: Bad target number (6:0)
[  168.481192] usb-storage: scsi cmd done, result=0x40000
[  168.481210] usb-storage: *** thread sleeping.
[  168.481409] usb-storage: queuecommand_lck called
[  168.481449] usb-storage: *** thread awakened.
[  168.481465] usb-storage: Bad target number (7:0)
[  168.481478] usb-storage: scsi cmd done, result=0x40000
[  168.481495] usb-storage: *** thread sleeping.
[  168.481592] usb-storage 1-1.3.1.1:1.0: scan complete
[  168.549971] scsi 0:0:0:0: Attached scsi generic sg0 type 0
I'm a bit out of my depth trying to debug this so any pointers are appreciated.

So far I've tried:
- Increasing the delay_use parameter of usb-storage
- Setting the various quirks options of usb-storage. So far just tried each option in turn, not combinations of options
- Compiling and enabling the SCSI generic module
- A different (older) USB HDD and that works just fine

thanks,
David.

Re: Trouble mounting USB hard drive

Posted: Mon Sep 24, 2012 3:35 pm
by Licaon_Kter
this happens even directly connected? ( and not through the hub that is )

Re: Trouble mounting USB hard drive

Posted: Tue Sep 25, 2012 12:20 am
by stretched
Licaon_Kter wrote:this happens even directly connected? ( and not through the hub that is )
Yes, no block device reported and dmesg output looks the same. I also verified the device works fine on the desktop machine both direct and via the same powered hub.

Re: Trouble mounting USB hard drive

Posted: Sun Sep 30, 2012 7:53 am
by stretched
any ideas?

Re: Trouble mounting USB hard drive

Posted: Sun Sep 30, 2012 8:18 am
by RaTTuS
power ?
how is it powered

Re: Trouble mounting USB hard drive

Posted: Mon Oct 01, 2012 7:54 am
by mikezoe65
I have the same problem- I have a 250Gb 2.5" hard drive from a laptop in an enclosure (carefully reformatted with NTFS) yet the RPi running Raspian will not show it although it reads happily both of two memory sticks. The HD is powered from a powered hub. Do I just give up or is there something I can do? If I need to download a file can somebody explain how in Raspian I do this? thanks

Re: Trouble mounting USB hard drive

Posted: Mon Oct 01, 2012 8:29 am
by RaTTuS
mikezoe65 wrote:I have the same problem- I have a 250Gb 2.5" hard drive from a laptop in an enclosure (carefully reformatted with NTFS) yet the RPi running Raspian will not show it although it reads happily both of two memory sticks. The HD is powered from a powered hub. Do I just give up or is there something I can do? If I need to download a file can somebody explain how in Raspian I do this? thanks
tail -f /var/log/syslog
plug in
ctrl-c
fdisk -l

what shows ?

Re: Trouble mounting USB hard drive

Posted: Mon Oct 01, 2012 11:51 am
by mikezoe65
Sorry for the ignorance but how do I get to type in this code on Raspian? Navigation please!

Re: Trouble mounting USB hard drive

Posted: Mon Oct 01, 2012 11:53 am
by RaTTuS
open a terminal session
or make sure that the Raspberry pi starts up in command line mode and not the GUI

Re: Trouble mounting USB hard drive

Posted: Mon Oct 01, 2012 12:34 pm
by ski522
My guess would be power is the problem...2.5 inch drives require about 1A to spin up. Take you're powered USB hub and plug that into system you used to verify the drive was okay and see if that works. What powered USB hub are you using, what is the power ratings on the hub? Not all usb powered hubs are the same, you need one that has at least one high-current (1.2A per port) port.

Re: Trouble mounting USB hard drive

Posted: Tue Oct 02, 2012 6:10 pm
by mikezoe65
Tried a different power supply and the hd now works! Thanks for the advice!

Re: Trouble mounting USB hard drive

Posted: Thu Oct 04, 2012 12:40 pm
by stretched
RaTTuS wrote:power ?
how is it powered
The hard drive draws it's power from the USB hub, which in turn is powered by an AC adapter (3A @ 5v).

Today I bought a new powered hub, connected it all up and now the drive is working normally. So you're absolutely correct; it's a power issue and now it's clear there is a problem with the old hub and/or power supply.

thanks,