Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 06-13-2004, 05:41 AM   #16
LQ Guru
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled

Firewire has the least overhead than USB, so Firewire is much faster. Both Firewire and USB is still unstable in LINUX. Use SATA, its a lot faster and it has much, much less overhead than Firewire and USB. With SATA you can get about 60 megabytes per second (if there is no filesystem overhead) and the transfer will not stall like USB or Firewire. What I read in this forum, USB 2.0 under Linux can not transfer more than 1 megabyte per second. I have used USB 1.0, I only get less than 500 kilobytes per second and copying large files stalls for a few seconds.
Old 06-13-2004, 06:30 AM   #17
Registered: Jun 2003
Location: Australia
Distribution: Gentoo/kernel 2.6.2
Posts: 45

Rep: Reputation: 15
I just set up a USB harddrive (actually it was a plain normal western digital IDE drive in a more or less no-name external USB harddrive box that I got for it) under debian.

I don't know what the support is like under earlier kernels, but I compiled by hand the 2.6.6 kernel (there were just a couple of things I needed to update/add first, but you can find a list of the most important stuff in docs/Changes (I think) in the kernel source tree).

The most important thing I wanted to say (and the reason I am writing this post) is that in order to ensure you have USB *2.0* support, and not just USB support, you must load the driver ehci-hcd. If you don't, you WILL be able to mount the drive, but you will wonder why you get continual I/O errors after you start reading from it and it just drops off the device tree. PROBLEMS (I imagine exactly the same style of problem you'd have if you tried to add one to a motherboard that was not USB 2.0 compatible).

so... ehci-hcd (as well as uhci-hcd which is your generic usb driver).

Also you will need the sd_mod installed. this is the SCSI disk module. You need this because it mounts the drive as a scsi device (so I imagine you would also need 'allow SCSI emulation' compiled (you should find this in the ATA/IDE/whatever section under 'device drivers' in the kernel config).

and just so you know when you are on the right track, here is a selection of relevant output from dmesg:

SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
ehci_hcd 0000:00:1d.7: Intel Corp. 82801EB USB2
ehci_hcd 0000:00:1d.7: irq 23, pci mem f8830000
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
USB Universal Host Controller Interface driver v2.2
uhci_hcd 0000:00:1d.0: Intel Corp. 82801EB USB
uhci_hcd 0000:00:1d.0: irq 16, io base 0000bc00
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
uhci_hcd 0000:00:1d.1: Intel Corp. 82801EB USB
uhci_hcd 0000:00:1d.1: irq 19, io base 0000b000
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
uhci_hcd 0000:00:1d.2: Intel Corp. 82801EB USB
uhci_hcd 0000:00:1d.2: irq 18, io base 0000b400
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
uhci_hcd 0000:00:1d.3: Intel Corp. 82801EB USB
uhci_hcd 0000:00:1d.3: irq 16, io base 0000b800
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb 1-4: new high speed USB device using address 2
scsi2 : SCSI emulation for USB Mass Storage devices
Vendor: Genesys Model: USB to IDE Disk Rev: 0002
Type: Direct-Access ANSI SCSI revision: 02
USB Mass Storage device found at 2
SCSI device sda: 390721968 512-byte hdwr sectors (200050 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
sda: sda1
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0

I have picked out the more important bits in bold.

SoI *think* the modules needed (which can be compiled as modules or into the kernel) are:
(scsi2 ?)
ide-scsi (scsi emulation)

maybe one or two more.
But just make sure you enable EHCI

oh and one more thing - as you can see - it's added the device as /dev/sda... and the single partition I put on the drive is called sda1. But the first time you mount the drive after buying it, you will need to run 'cfdisk /dev/sda' to partition the drive, and then run 'mkfs.ext3 /dev/sda1' (or whatever the partitions you put on it are, and whatever the filesystem you want is) to format it.
Then you can stick lines in /etc/fstab to have the partitions automounted at boot - just like you do with anything else.

However keep in mind that if you unplug it, and plug it back in - it will then be on the NEXT scsi channel... not sda but sdb (I think) and so on... it will keep incrementing by one each time.

I think with this info you should be able to muddle though - after all mine is working now and that's more or less what I found I needed to do.

Last edited by eccles23; 06-13-2004 at 06:38 AM.
Old 06-13-2004, 08:28 AM   #18
Registered: Sep 2003
Location: ky
Distribution: gentoo
Posts: 404

Rep: Reputation: 32
Electro you have bad info i just served a file with apache from a usb2 drive at 11.1mb/sec
usb2 must be faster but that is as fast as i can move a file over my 10/100 network.
this was on Apache 2.0.49-r3 Gentoo Linux 3.3.2-r5 gcc 3.3.2 CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe" on asus a7n8x dx 512mb ram
Old 06-13-2004, 08:37 AM   #19
Registered: Sep 2003
Distribution: Just upgraded to Slackware 10.0
Posts: 91

Rep: Reputation: 15
This is like 802.11g. Do you need the extra bandwidth? Firewire is faster than USB 2.0, which is faster than USB 1.0. However, will the OP be doing the kind of bandwidth hungry applications where it will be noticed?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
External hard drives nickd_1999 Linux - Hardware 2 12-19-2005 11:39 PM
External USB hard drives works with Linux? Xavius Linux - Hardware 2 10-03-2005 01:54 PM
external hard drives in linux cwl157 Linux - Hardware 1 09-27-2005 08:18 PM
Linux Support for USB 2.0 External Hard Drives cblucher Linux - Newbie 9 12-28-2003 10:04 PM
Linux Friendly External Hard Drives New2Lindows Linux - Hardware 1 08-16-2003 11:52 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration