Unable to access USB HDD (2.5) Using Raspbian & Arch Linux


4 posts
by margoob » Mon Jun 10, 2013 3:18 pm
Hello,

I've been using my RasPi for the past few months with "Wheezy" just fine. I was using it as my headless linux box and everything was nice till I decided to use it as a file server and add an external HDD. The moment I plug in my USB, it does a reset but I guess that's due to current drop as I'm using Revision 1 and that's not the issue here.

The issue is, despite being able to see the hard-drive, I can't actually mount it. When I do an "sudo fdisk -l" I see only the SD Card. I see this in the "/var/log/messages" file:

Code: Select all
Jun 10 21:57:50 raspberrypi kernel: [    2.882428] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
Jun 10 21:57:50 raspberrypi kernel: [    3.002922] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Jun 10 21:57:50 raspberrypi kernel: [    3.011946] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun 10 21:57:50 raspberrypi kernel: [    3.025038] smsc95xx v1.0.4
Jun 10 21:57:50 raspberrypi kernel: [    3.087603] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:78:05:cc
Jun 10 21:57:50 raspberrypi kernel: [    3.182458] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
Jun 10 21:57:50 raspberrypi kernel: [    3.303445] usb 1-1.2: New USB device found, idVendor=04cf, idProduct=8818
Jun 10 21:57:50 raspberrypi kernel: [    3.327386] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 10 21:57:50 raspberrypi kernel: [    3.339315] usb 1-1.2: Product: USB Mass Storage Device
Jun 10 21:57:50 raspberrypi kernel: [    3.346983] usb 1-1.2: Manufacturer: Myson Century, Inc.
Jun 10 21:57:50 raspberrypi kernel: [    3.354501] usb 1-1.2: SerialNumber: 100


And this is what I get from "lsusb -v" :

Code: Select all
Bus 001 Device 004: ID 04cf:8818 Myson Century, Inc. USB2.0 to ATAPI Bridge Controller
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x04cf Myson Century, Inc.
  idProduct          0x8818 USB2.0 to ATAPI Bridge Controller
  bcdDevice           a3.05
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4
    bmAttributes         0xc0
      Self Powered
    MaxPower               10mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      5 SFF-8070i
      bInterfaceProtocol     80
      iInterface              5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0


I've done "update-usbids && sudo update-pciids" and "apt-get install ntfs-3g" already.

Also, I saw that some ubuntu user had the same issue and being both Wheezy and Ubuntu from Debian, I made the following change in /etc/usb_modeswitch.conf file as that seemed to have helped some ubuntu users:

DisableSwitching=1

Yet I'm stuck here. Any help is most welcome :)
Posts: 2
Joined: Mon Jun 10, 2013 2:17 pm
by Jessie » Mon Jun 10, 2013 6:31 pm
Are you powering the HDD off the Pi's USB ports? If so that is most likely your issue.

Hotplugging drives isn't even reccomended for a USB thumb drive much less a HDD. Anything other than a KB dongle causes both mine (rev 1 and 2) to crash and reboot.
Click my website link under my avitar for the RetroPie 2.3 guide in progress.
User avatar
Forum Moderator
Forum Moderator
Posts: 1692
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA
by andrum99 » Mon Jun 10, 2013 6:50 pm
margoob wrote:The issue is, despite being able to see the hard-drive, I can't actually mount it. When I do an "sudo fdisk -l" I see only the SD Card. I see this in the "/var/log/messages" file:


Unless your USB hard disk has its own power supply, it won't work when you plug it directly into the Pi. The Raspberry Pi's USB ports cannot supply enough power - they are limited to 140mA if memory serves. Bus powered hard drives need 500mA or more. So you need either a powered USB hub, or an external power supply for the drive, if it supports one.

Once the hard drive spins up and is recognised, dmesg will show messages like this:
Code: Select all
[    6.193668]  sda: sda1
[    6.216072] sd 0:0:0:0: [sda] No Caching mode page present
[    6.242503] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    6.262573] sd 0:0:0:0: [sda] Attached SCSI disk

The same also shows up in /var/log/messages with the current date and time on the front of each line.

Cheers

Andrew.
My blog, with lots of Raspberry Pi goodness: andrum99.blogspot.co.uk
Posts: 230
Joined: Fri Jul 20, 2012 2:41 pm
by margoob » Tue Jun 11, 2013 8:38 am
Thanks guys. I saw in all the "Make your own Raspberry PI file server" articles online using USB hard drives and as you know, 2.5" ones don't come with a power supply.

I'll get a powered usb hub and give it a go. As soon as I get any results, will update it here.

Thanks again for the quick reply!
Posts: 2
Joined: Mon Jun 10, 2013 2:17 pm