5

I try to connect a harddrive via a SATA to USB3 adapter to my raspberry (The adapter is externally powered, so there cannot be a power problem).

The adapter gets detected and shows up under /dev/sda but there is no /dev/sda1 (There is one partition on the drive).

Following you see some commands and their output:


Before connecting:

root@raspberrypi:~# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.

Afer connecting:

root@raspberrypi:~# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 007: ID 174c:55aa ASMedia Technology Inc. 

New log messages after connecting:

root@raspberrypi:~# tail -f /var/log/messages
Jun  9 22:48:24 raspberrypi kernel: [ 1551.505821] usb 1-1.3: new high-speed USB device number 9 using dwc_otg
Jun  9 22:48:25 raspberrypi kernel: [ 1552.447820] usb 1-1.3: New USB device found, idVendor=174c, idProduct=55aa
Jun  9 22:48:25 raspberrypi kernel: [ 1552.447858] usb 1-1.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jun  9 22:48:25 raspberrypi kernel: [ 1552.447881] usb 1-1.3: Product: ASMT1051
Jun  9 22:48:25 raspberrypi kernel: [ 1552.447898] usb 1-1.3: Manufacturer: asmedia
Jun  9 22:48:25 raspberrypi kernel: [ 1552.447915] usb 1-1.3: SerialNumber: 123456789012
Jun  9 22:48:25 raspberrypi kernel: [ 1552.459682] usb-storage 1-1.3:1.0: USB Mass Storage device detected
Jun  9 22:48:25 raspberrypi kernel: [ 1552.460159] usb-storage 1-1.3:1.0: Quirks match for vid 174c pid 55aa: 400000
Jun  9 22:48:25 raspberrypi kernel: [ 1552.462992] scsi host5: usb-storage 1-1.3:1.0
Jun  9 22:48:26 raspberrypi kernel: [ 1553.457014] scsi 5:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
Jun  9 22:48:26 raspberrypi kernel: [ 1553.461797] sd 5:0:0:0: [sda] Attached SCSI removable disk
Jun  9 22:48:26 raspberrypi kernel: [ 1553.462393] sd 5:0:0:0: Attached scsi generic sg0 type 0

With the adapter connected:

root@raspberrypi:~# ls -l /dev/sd*
brw-rw---T 1 root floppy 8, 0 Jun  9 22:48 /dev/sda

root@raspberrypi:~# parted /dev/sda
Error: Error opening /dev/sda: No medium found                            
Retry/Cancel?    

The same adapter connected to my pc:

:~> sudo parted /dev/sdb print
Model: ASMT 2105 (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  320GB  320GB  primary  ntfs         boot, type=07

I have Openmediavault(based on debian) installed.

What could be wrong? What can I do to get maybe more information or even get it running?

EDIT:

I want to add, that the HDD is not even spinning.

EDIT 2:

As requested in one of the comments here are the kernel versions of the Raspberry Pi and my PC.

Raspberrypi:

root@raspberrypi:~# uname -a
Linux raspberrypi 4.1.19+ #858 Tue Mar 15 15:52:03 GMT 2016 armv6l GNU/Linux

My PC:

:~> uname -a
Linux linux-l5eu 4.1.21-14-default #1 SMP PREEMPT Sun Apr 17 07:27:45 UTC 2016 (fc187c1) x86_64 x86_64 x86_64 GNU/Linux

So both shouldn't be too old, right?

And I have the Raspberry Pi model B(compare here):

root@raspberrypi:~# cat /proc/cpuinfo | grep "Revision"
Revision        : 0002
12
  • Does the drive work when connected to a PC? Jun 12, 2016 at 15:42
  • Can you also please share the type of adapter being used? Jun 12, 2016 at 15:47
  • @MohammadAli I posted already the output of the adapter connected to my pc.
    – exilit
    Jun 12, 2016 at 17:52
  • Have you tried using a 2.5 amp or greater power supply connected to your Pi? Jun 12, 2016 at 21:09
  • @MohammadAli as I mention before the adapter is self-powered so this should not be a problem related to the power supply.
    – exilit
    Jun 12, 2016 at 21:11

3 Answers 3

4
+100

Because you state that your Pi is the original model b and that another external hard drive also does not work I believe that you are experiencing a power issue. The original model b raspberry Pi used polyfuses to protect USB devices, but what this also did was limit the USB output current to approximately 140miliamps which should be enough for things such as USB drives, but with spinning media your Pi won't be able to provide enough power to the drive as you have noticed with the other non externally powered drive that you own. Although you are under the impression that your adapter bring externally powered that this can not be a power issue. I believe that your adapter simply believes that it isn't connected when it is, this is likely because your adapter is expecting the USB slandered minimum current of 500ma.

To solve this I belive that you should purchase a powered USB hub, or to bridge the polyfuses on your Pi to increase the power output limit. You can find out how to do this here

10
  • 1
    I can confirm anecdotally that I have not gotten a USB drive to power directly from a model B, or read anyone else here claiming they have; the + and later models are fine (although except for the 3, you must add max_usb_power=1 to /boot/config.txt).
    – goldilocks
    Jun 13, 2016 at 13:14
  • Thanks for your great answer first. I should concern doing this change, but first I want to get more information related to the polyfuses on the internet. And although I realy like your answer I am little bit sceptical because the log shows that it is detected and connected. But maybe I should just give it a try.
    – exilit
    Jun 13, 2016 at 13:43
  • 1
    @exilit you could always try a powered hub, I believe that it may be because a lot of drive adapters use things like NPN transistors to start the drive up, now although being externally powered, still require the base of the transistor to be powered to the USB specification of .5 amps which the Pi is not capable of. This is done to prevent the drive from running all the time to increase its life span, and it may still be connected in the log because often with drive adapters, the USB chip in them will be always running to allow for the fastest possible drive access times. Jun 13, 2016 at 13:48
  • @MohammadAli I remember that I had problems with a powered hub before, but not sure right now... One more question to that solution: Do you know any drawbacks or risks using this approach?
    – exilit
    Jun 13, 2016 at 14:51
  • @exilit which approach?, the powered hub or bridging the polyfuse? Jun 13, 2016 at 15:28
0

You are using a SATA-to-USB3 adapter. Raspberry Pi does not support USB3. :)

6
  • But USB 3 is backward compatible, isn't it?
    – exilit
    Jun 12, 2016 at 17:50
  • 2
    It is, but this a USB3 adapter, not a USB3 device. USB3 devices have their data paths setup so that they can still work with USB2 ports, your adapter may have it's data paths setup for max performance, making it USB3-only. Try it on a USB2 port on your laptop.
    – tlhIngan
    Jun 12, 2016 at 19:43
  • @thingan Trying it on a USB2 port seems to work also.
    – exilit
    Jun 12, 2016 at 21:25
  • which kernel are you running on the Pi? On your desktop?
    – JayEye
    Jun 13, 2016 at 1:58
  • @JayEye I edited my question. It now contains information about the kernel versions.
    – exilit
    Jun 13, 2016 at 10:52
0

I would try it in another way. First I would take a look at fdisk

root@Raspi:~# fdisk -l

this shows something like this

[...]
Device         Boot  Start      End   Sectors  Size Id Type
/dev/mmcblk0p1        8192   137215    129024   63M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      137216  31116287 30979072 14,8G 83 Linux

Disk /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x965a1a59

Device     Boot Start        End     Sectors   Size Id Type
/dev/sdb1            63 1953520064  1953520002 931,5G  c W95 FAT32 (LBA)

(I noticed that it depends on witch of the 4 USB Connectors you plug your Hard-drive, you get different values for your removable devices sda1 sdb1 ... etc ..)

and then you prolly want to do this:

root@Raspi:~# mount -t vfat -o utf8,uid=pi,gid=pi,noatime /dev/sdb1 /media/usbstick

But you could go a step forward and ask your box:

root@Raspi:~# ls -al /dev/disk/by-uuid/
insgesamt 0
drwxr-xr-x 2 root root 100 Jun 13 15:38 .
drwxr-xr-x 6 root root 120 Jun 13 05:46 ..
lrwxrwxrwx 1 root root  10 Jun 13 15:38 1105-1008 -> ../../sda1
lrwxrwxrwx 1 root root  15 Jun 13 05:46 202638e1-4ce4-45df-9a00-ad725c2537bb -> ../../mmcblk0p2
lrwxrwxrwx 1 root root  15 Jun 13 05:46 22E0-C711 -> ../../mmcblk0p1

The UUID in this case is 1105-1008

now knowing the UUID you could mount it by UUID

root@Raspi:~# udisksctl mount --block-device /dev/disk/by-uuid/1105-1008

have fun.

1
  • 2
    Thank you, I will give it a try before doing any hardware modifications. But to be honest I do not expect much of it as it seems not to be inserted into the device tree.
    – exilit
    Jun 13, 2016 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.