jbs4115
Posts: 3
Joined: Tue Dec 03, 2013 10:14 pm

SOLVED - USB Storage

Tue Dec 03, 2013 10:37 pm

I am having problems with a usb attached drive. In the forum help it said to submit info so that is here and the question will follow:

root@raspberrypi:/home/john# lsusb -v

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 2 TT per port
bMaxPacketSize0 64
idVendor 0x0424 Standard Microsystems Corp.
idProduct 0x9512
bcdDevice 2.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 1 Single TT
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 2 TT per port
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 3
wHubCharacteristic 0x000d
Per-port power switching
Compound device
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 1 milli Ampere
DeviceRemovable 0x02
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0503 highspeed power enable connect
Port 2: 0000.0503 highspeed power enable connect
Port 3: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 3.06
iManufacturer 3 Linux 3.6.11+ dwc_otg_hcd
iProduct 2 DWC OTG Controller
iSerial 1 bcm2708_usb
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 1
wHubCharacteristic 0x0008
Ganged power switching
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0503 highspeed power enable connect
Device Status: 0x0001
Self Powered

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 1
bMaxPacketSize0 64
idVendor 0x0424 Standard Microsystems Corp.
idProduct 0xec00
bcdDevice 2.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
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 0x02 EP 2 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 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 4
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 0
bDeviceProtocol 1
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered

Bus 001 Device 004: ID 174c:55aa ASMedia Technology Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x174c ASMedia Technology Inc.
idProduct 0x55aa
bcdDevice 1.00
iManufacturer 2 ASMedia
iProduct 3 AS2105
iSerial 1 0123456789ABCDEF
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
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 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Status: 0x0001
Self Powered
root@raspberrypi:/home/john# dmesg
root@raspberrypi:/home/john# uname -a
Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
root@raspberrypi:/home/john# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 293G 0 part /mnt/Main
├─sda2 8:2 0 97.7G 0 part /mnt/Second
├─sda3 8:3 0 97.7G 0 part /mnt/Nexus
├─sda4 8:4 0 97.7G 0 part /mnt/brian
└─sda5 8:5 0 345.6G 0 part /mnt/misc
mmcblk0 179:0 0 7.4G 0 disk
├─mmcblk0p1 179:1 0 1.2G 0 part
├─mmcblk0p2 179:2 0 1K 0 part
├─mmcblk0p3 179:3 0 32M 0 part
├─mmcblk0p5 179:5 0 60M 0 part /boot
└─mmcblk0p6 179:6 0 6.1G 0 part /
root@raspberrypi:/home/john#


The attached drive is a Seagate 1tb sata 3.5 hdd placed in a powered case and attached to one of the usb ports on the pi. It is the ASMedia Technology Inc item. The drive is formatted in ext4 and divided into partitions. Folders were created in the /mnt directory and the fstab file was edited to mount the drive on reboot.
/dev/sda1 /mnt/Main ext4 defaults 0 0
/dev/sda2 /mnt/Second ext4 defaults 0 0
/dev/sda3 /mnt/Nexus ext2 defaults 0 0
/dev/sda4 /mnt/brian ext4 defaults 0 0
/dev/sda5 /mnt/misc ext4 defaults 0 0
I made the directories, edited the fstab and then rebooted. The drives were mounted correctly and data could be written/read from the partitions. The next day when I accessed the pi (the pi was never turned off but left running 24/7) I couldn't access the folders. When I did lsblk I discovered that the drive partitions were now mounted as /dev/sdb*. I rebooted and everything was fine. The next day I had the same problem. I don't know exactly how long between it being good and changing but it always happens. I tried changing the usb port but that did nothing.

Hopefully I have included all info needed for help but if I am missing something let me know and I will post it. My intent is to use the pi and drive as a backup device for my desktop and laptop using rsync soon to have my son to be able to use it to back up his windows laptop so he has off site storage. Hopefully to expand and have a redundant backup of this drive also.

thanks for any help or suggestions,

john
Last edited by jbs4115 on Thu Dec 05, 2013 4:14 am, edited 1 time in total.

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: USB Storage

Wed Dec 04, 2013 12:26 am

You need to find a way to disable power management on your drive.

When it powers down the RPi doesn't notice it's gone. (That could count as a bug in the storage device driver.)
When it powers back up the RPi says "oh look a new device has just been attached" and enumerates it and assigns the next available storage device (/dev/sd) to it.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jbs4115
Posts: 3
Joined: Tue Dec 03, 2013 10:14 pm

Re: USB Storage

Wed Dec 04, 2013 3:11 am

Thanks, that makes sense but I didn't think it was powering down. Guess I haven't watched it close enough. That should keep me busy for awhile trying to figure out how to do that. It has it's own power supply which is plugged into a wall outlet. Didn't think about it powering down unless I turned it off.

Thanks for the help,

john

jbs4115
Posts: 3
Joined: Tue Dec 03, 2013 10:14 pm

Re: SOLVED - USB Storage

Thu Dec 05, 2013 4:17 am

Marked solved. Power was the problem. I was actually turning the drive off when I turned off my desktop monitors and didn't realize it.

Thanks DougieLawson. You were right and problem solved.

john

Return to “Raspberry Pi OS”