Can't access external usb drive

Hi there,

I’ve got an USB-to-IDE hard disk drive enclosure to revive an old IDE harddrive. I installed the drive and connected it to my pc running opensuse 11.2. Unfortunately the drive wasn’t recognised, so I couldn’t access it. This is the output of dmesg:

May 18 18:53:57 advo kernel: [81051.520117] usb 1-4: new high speed USB device using ehci_hcd and address 10
May 18 18:53:58 advo kernel: [81053.041979] usb 1-4: New USB device found, idVendor=058f, idProduct=6391
May 18 18:53:58 advo kernel: [81053.042107] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 18 18:53:58 advo kernel: [81053.042208] usb 1-4: Product: USB TO IDE Bridge
May 18 18:53:58 advo kernel: [81053.042284] usb 1-4: Manufacturer: Generic
May 18 18:53:58 advo kernel: [81053.043002] usb 1-4: configuration #1 chosen from 1 choice
May 18 18:54:00 advo kernel: [81055.270410] scsi6 : SCSI emulation for USB Mass Storage devices
May 18 18:54:00 advo kernel: [81055.272399] usb-storage: device found at 10
May 18 18:54:00 advo kernel: [81055.272420] usb-storage: waiting for device to settle before scanning
May 18 18:54:05 advo kernel: [81059.558726] usb-storage: device scan complete

From what I understand, the device in /dev/ wasn’t created and therefore I couldn’t do anything with the drive.

“lsusb -v” gives me:

Bus 001 Device 010: ID 058f:6391 Alcor Micro Corp. 
Device Descriptor:                                 
  bLength                18                        
  bDescriptorType         1                        
  bcdUSB               2.00                        
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0                             
  bDeviceProtocol         0                             
  bMaxPacketSize0        64                             
  idVendor           0x058f Alcor Micro Corp.           
  idProduct          0x6391                             
  bcdDevice            1.00                             
  iManufacturer           1 Generic                     
  iProduct                2 USB TO IDE Bridge           
  iSerial                 0                             
  bNumConfigurations      1                             
  Configuration Descriptor:                             
    bLength                 9                           
    bDescriptorType         2                           
    wTotalLength           32                           
    bNumInterfaces          1                           
    bConfigurationValue     1                           
    iConfiguration          0                           
    bmAttributes         0xc0                           
      Self Powered                                      
    MaxPower              100mA                         
    Interface Descriptor:                               
      bLength                 9                         
      bDescriptorType         4                         
      bInterfaceNumber        0                         
      bAlternateSetting       0                         
      bNumEndpoints           2                         
      bInterfaceClass         8 Mass Storage            
      bInterfaceSubClass      6 SCSI                    
      bInterfaceProtocol     80 Bulk (Zip)              
      iInterface              0                         
      Endpoint Descriptor:                              
        bLength                 7                       
        bDescriptorType         5                       
        bEndpointAddress     0x01  EP 1 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     0x82  EP 2 IN              
        bmAttributes            2                       
          Transfer Type            Bulk                 
          Synch Type               None                 
          Usage Type               Data                 
        wMaxPacketSize     0x0200  1x 512 bytes         
        bInterval               0                       
Device Qualifier (for other device speed):              
  bLength                10                             
  bDescriptorType         6                             
  bcdUSB               2.00                             
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0                             
  bDeviceProtocol         0                             
  bMaxPacketSize0        64                             
  bNumConfigurations      1                             
Device Status:     0x0000                               
  (Bus Powered)

“lsmod”:


tcp_diag                1504  0      
ip6t_LOG                6468  8      
xt_tcpudp               3136  32     
xt_pkttype              1632  5      
ipt_LOG                 6276  15     
xt_limit                2692  23     
inet_diag              10152  2 tcp_diag
snd_pcm_oss            51616  0         
snd_mixer_oss          19104  1 snd_pcm_oss
snd_seq                64784  0            
snd_seq_device          8620  1 snd_seq    
edd                    10472  0            
i915                  251464  2            
drm                   185440  2 i915       
i2c_algo_bit            6884  1 i915       
cpufreq_conservative     8396  0
cpufreq_userspace       3332  0
cpufreq_powersave       1568  0
ip6t_REJECT             5472  3
nf_conntrack_ipv6      22036  4
acpi_cpufreq            9452  0
speedstep_lib           5092  0
ip6table_raw            3008  1
xt_NOTRACK              1632  4
ipt_REJECT              3168  3
xt_state                2208  15
iptable_raw             2848  1
iptable_filter          3616  1
ip6table_mangle         4160  0
nf_conntrack_netbios_ns     2560  0
nf_conntrack_ipv4      11688  11
nf_conntrack           84768  5 nf_conntrack_ipv6,xt_NOTRACK,xt_state,nf_conntrack_netbios_ns,nf_conntrack_ipv4
nf_defrag_ipv4          2112  1 nf_conntrack_ipv4
ip_tables              13392  2 iptable_raw,iptable_filter
ip6table_filter         3616  1
ip6_tables             14832  4 ip6t_LOG,ip6table_raw,ip6table_mangle,ip6table_filter
x_tables               19524  11 ip6t_LOG,xt_tcpudp,xt_pkttype,ipt_LOG,xt_limit,ip6t_REJECT,xt_NOTRACK,ipt_REJECT,xt_state,ip_tables,ip6_tables
fuse                   74332  1
ext4                  381512  2
jbd2                   96288  1 ext4
crc16                   1952  1 ext4
loop                   17228  0
dm_mod                 84900  0
snd_hda_codec_realtek   233860  1
snd_hda_intel          31776  3
snd_hda_codec          94688  2 snd_hda_codec_realtek,snd_hda_intel
usblp                  14304  0
snd_hwdep               8740  1 snd_hda_codec
snd_pcm                96324  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer              25960  2 snd_seq,snd_pcm
iTCO_wdt               12164  0
sr_mod                 17572  0
iTCO_vendor_support     3876  1 iTCO_wdt
i2c_i801               12756  0
cdrom                  40768  1 sr_mod
snd                    75236  16 snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
r8169                  38276  0
pcspkr                  2784  0
rt2860sta             559908  0
asus_atk0110           13888  0
snd_page_alloc         10600  2 snd_hda_intel,snd_pcm
serio_raw               6276  0
sg                     32884  0
intel_agp              31460  1
video                  24600  1 i915
button                  6608  0
reiserfs              260296  1
fan                     5028  0
thermal                21084  0
processor              50576  1 acpi_cpufreq
thermal_sys            18344  4 video,fan,thermal,processor

I tried Kubuntu 10.04 on the same computer, connected the drive, used fdisk to create a FAT32 partition, copied a video to it without any problems. The drive was even recognised by my DVD-Player (which has an USB port) so I could watch the video on TV.

Tried the now formatted and partitioned drive with opensuse - no success, dmesg showed the same messages as stated above.

Does anybody have an idea about what I’m missing?

regards,
advocaat

From what I see, the drive is recognized and should have automounted under /media/disk1 or something similar. Check in your tree for the drive at /mnt /media /local. If you find it there then maybe it’s a permission problem. You can also check using yast->Partitioning which should show the drive but don’t use Yast to set automount unless you don’t intend to never disconect it.

Hmm, strange. dmesg should show that the kernel has found the disk and the partitions.

Is the drive housing powered by the USB port or does it have its own power? If the former and the USB port doesn’t supply sufficient power the drive may not spin up.

With the external drive plugged in, try

fdisk -l

Even if its not auto-mounted, it should still appear here.

@ken_yap
The case has its own power supply, I can hear the drive spinning up, the LED on the case is blinking.

@deano_ferrari
fdisk -l gives

Platte /dev/sda: 160.0 GByte, 160041885696 Byte
255 Köpfe, 63 Sektoren/Spuren, 19457 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Disk identifier: 0x0001e195

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1   *           1           6       48163+  83  Linux
/dev/sda2               7         149     1148647+  82  Linux Swap / Solaris
/dev/sda3             150         757     4883760   83  Linux
/dev/sda4             758       19457   150207719+   5  Erweiterte
/dev/sda5             758        1365     4883728+  83  Linux
/dev/sda6            1366        2581     9767488+  83  Linux
/dev/sda7            2582       18247   125829112   83  Linux
/dev/sda8           18247       19457     9727326   83  Linux

So I guess the device is found but somehow not created under /dev/. Could this be a udev problem?

Wait a moment, this is /dev/sda, which is the internal disk no? Your external disk should be /dev/sdb. So it’s still not seen.

So I guess the device is found but somehow not created under /dev/. Could this be a udev problem?
Reply With Quote

As your ‘fdisk -l’ output does not show a sdb device, this shows it is not being recognised as a storage device. It could be a usb power supply issue (as ken_yaps suggested) if applicable. It might also be a hardware failure. Can you test your external drive’s behaviour with another computer?

I tried Kubuntu 10.04 on the same computer, connected the drive, used fdisk to create a FAT32 partition, copied a video to it without any problems. The drive was even recognised by my DVD-Player (which has an USB port) so I could watch the video on TV.

Edit: Just to clarify, are you saying your device is detected and mounted correctly with kubuntu at present?

Yes, same computer, different linux (Kubuntu 10.04 LTS atm). This is what confuses me the most - Kubuntu and my DVD-player do not have any problems with the disk.

Since opensuse sees an usb-storage-device (see the dmesg-output in my first post) I don’t understand why there’s no device in the /dev tree. I don’t know which program is responsible for managing device creation etc. I would suspect udev/hal and the like, but this is beyond my current linux-skills :).

I don’t know which program is responsible for managing device creation etc. I would suspect udev/hal and the like, but this is beyond my current linux-skills .

Yes, correct, hal/udev handles this, along with your desktop for actual mounting. I dont’ think the problem is here. (Your dmesg results verify this).

I tried Kubuntu 10.04 on the same computer, connected the drive, used fdisk to create a FAT32 partition, copied a video to it without any problems. The drive was even recognised by my DVD-Player (which has an USB port) so I could watch the video on TV.

Tried the now formatted and partitioned drive with opensuse - no success, dmesg showed the same messages as stated above.

Have you tried your external disk with kubuntu, dvd-player, or another computer since first partitioning etc? That is to say, are you sure that your device is still working correctly? (Maybe worth checking that the drive is plugged into the ide connector and is powered properly).

I’ve got an USB-to-IDE hard disk drive enclosure to revive an old IDE harddrive.

This makes me cautiously suspicious that it is the ide disk.

Anyway, try this from a console

lshal -m

then plug in your device. I would like to see the output from openSUSE and Kubuntu (on the same computer).

Thats about all I can offer.

For what it’s worth:

Shouldn’t the OP have the ‘usbserial’ kernel module loaded?

It is on my 11.2 installation.

This is the output of lshal -m on opensuse when I plug the disk in:

Start monitoring devicelist:
-------------------------------------------------
10:11:39.961: usb_device_58f_6391_noserial added
10:11:42.162: usb_device_58f_6391_noserial_if0 added
10:11:42.183: usb_device_58f_6391_noserial_if0_scsi_host added

Same with kubuntu running:

Start monitoring devicelist:
-------------------------------------------------
10:23:23.997: usb_device_58f_6391_noserial added
10:23:26.216: usb_device_58f_6391_noserial_if0 added
10:23:26.250: usb_device_58f_6391_noserial_if0_scsi_host added
10:23:31.480: usb_device_58f_6391_noserial_if0_scsi_host_0 added
10:23:31.527: usb_device_58f_6391_noserial_if0_scsi_host_0_scsi_device_lun0 added
10:23:31.533: usb_device_58f_6391_noserial_if0_scsi_host_0_scsi_device_lun0_scsi_generic added
10:23:31.901: storage_serial_Generic_USB_Disk_0_0 added
10:23:31.988: volume_uuid_4438_266D added

I discovered that the the drive is working with opensuse when it is plugged in and switched on before I switch on the pc. When connecting the drive to the running computer does not work.
I compared the “Hardware-Informationen” (via Yast → Hardware → Hardware Information) in both cases:

http://lukasfenner.lu.funpic.de/yast_hw-info.png

So when the disk is running before starting suse it is recognised as an usb-disk on the scsi bus (left side), when plugging it in while running suse it is recognised as an usb-to-ide-bridge and no block devices are created.

Any idea?

Thanks for the info. I’ve had a quick look, but its not obvious to me as to why the kernel drivers don’t create the expected device node (apart from at boot). You don’t have any kernel boot options like ‘apci=no’ (or similar) present by chance?

It might be worth comparing the (removable storage) udev rules between Kubuntu and openSUSE, to see whether the difference in behaviour lies here.

I would also like to see the output of

lsscsi
sg_scan

in the case of the drive present at boot, and then hot-plugged.

Hi,

I have the same box and the same problem. rescanning the scsi bus solves the problem (/usr/bin/rescan-scsi-bus.sh /usr/bin/X11/rescan-scsi-bus.sh)

My idea would be to run the script automatically after an usb-storage device is connected, but I’ve no idea how to do this in an elegant way.

I figured that the disk is recognized, when it is switched on and the usb-connector is plugged in twice (I have to do the following: switch drive on - connect usb-cable - disconnect usb - reconnect usb) and everything is running fine. This is acceptable for me, therefore i didn’t investigatethe situation any further.

Rescanning, as wobremer suggested, works here too, but has to be done as root.

Has it been formatted? Have you tried (if in XP) disk management (Rt-clk My Computer > manage)?

The dirve is working fine, once it is detected, and of course it is formatted.

IT also works well with windows.