LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   External Hard Drives for Linux (https://www.linuxquestions.org/questions/linux-hardware-18/external-hard-drives-for-linux-192367/)

vicky4u_hyd 06-11-2004 11:56 AM

External Hard Drives for Linux
 
Hello all,

I have a Redhat 8.0 Server on my machine and would like to have an 300GB external Hard Drive installed on this machine for my extra storage.
Every dealer of External Hard Drive I see does not have Linux in their Support. Is there any Company where i can get a 300GB external Hard Drive for Linux.

Thank you
Vikram Gollakota

heathpitts 06-11-2004 12:16 PM

are you trying to hook it up by firewire, usb2, or other? Just because they don't "support" linux doesn't mean it won't work. It just has to be mounted and formatted to work in linux. Most if not all external drives should work just fine in linux.

vicky4u_hyd 06-11-2004 12:38 PM

Hello Heath,

Thanks for the reply
Actually i am looking for a USB hook up method. So I can go ahead and buy any External Drive and try to hook it up. Do I need to do some special mounting to get it hooked up with Linux.

Thanks
Vikram

heathpitts 06-11-2004 12:50 PM

Many times no. Since you are using redhat I am not sure of the specifics. Using debian it is hotplug that makes usb/firewire devices show up. then just mount the dev under a folder and you are ready to go. You could always burn a knoppix cd and boot off that. Then you would know whether your hardware is working correctly or not.

antipop 06-11-2004 05:31 PM

I'm sorry to talk about my problem here but i was wondering if anyone knows how to make usb2.0 work under debian?

I have an external HDD and it's a usb2.0 drive (tested fine under windows), with debian, it's recognized (i added a part in the fstab file) and i'ts working fine but the transfer speed is less than 1Mb/s which is why i assume it's only working as a usb1 drive.

heathpitts 06-11-2004 07:29 PM

what kernel are you using? I believe the support is included in kernel 2.4.23 and above (including 2.6) If your kernel version is lower than that you may need to update the kernel to get the module support.

antipop 06-11-2004 11:20 PM

I'm using the kernel 2.4.26, should i update to a more recent version of the kernel (i heard the 2.4.26 was the best version)

heathpitts 06-12-2004 09:03 AM

try booting with a knoppix >ver 3.4 cd. http://www.knoppix.net See what your transfer speed is on it. You can boot off of either the 2.4.x kernel or 2.6.x kernel from the same cd. Since knoppix is based on debian, this would tell you if the kernel version is what is slowing your drive down or if it is a driver issue with your particular card.

issue the command lspci and post what the usb controller line says. We may be able to figure out more about the problem with that info. also use dmesg to see if there are any other errors on hardware loading.

enyawix 06-12-2004 09:51 AM

Get a usb2 drive they are easy to support. I am working on a support page my linux hardware site now. I will pay for any help i can get.

antipop 06-12-2004 10:06 AM

10x heathpitts, i'll try that next week end, i'm pretty busy atm

enyawix 06-12-2004 11:24 AM

antipop debian is based on software that is too old. upgread the usb tools and kernel by hand.

KingofBLASH 06-12-2004 12:33 PM

Quote:

Originally posted by vicky4u_hyd
Hello Heath,

Thanks for the reply
Actually i am looking for a USB hook up method. So I can go ahead and buy any External Drive and try to hook it up. Do I need to do some special mounting to get it hooked up with Linux.

Thanks
Vikram

Hey,

Before you get happy with the USB 2.0 drive, is there a reason you want USB over Firewire? IIRC Firewire has a lot more throughput than USB, and might be better if you don't have a reason for needing USB. BTW, what kind of USB drive did you buy? I have to go out and buy one at some point too. My laptop doesn't have a firewire port :(

enyawix 06-12-2004 01:39 PM

USB2 is faster than firewire and the linux driver is more stable.

antipop 06-12-2004 01:49 PM

Quote:

Originally posted by enyawix
USB2 is faster than firewire and the linux driver is more stable.
usb 2.0 has the same theorical speed than firewire
I would have bought the firewire version but my bro comp doesn't have firewire, and usb 2.0 is more common than firewire

enyawix 06-12-2004 02:51 PM

Quote:

usb 2.0 has the same theorical speed than firewire
USB2 is rated at 480 firewire is rated at 400

Electro 06-13-2004 05:41 AM

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.

eccles23 06-13-2004 06:30 AM

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:
usbcore
usbfs
hub
ehci_hcd
uhci_hcd
usb-storage
(scsi2 ?)
ide-scsi (scsi emulation)
sd_mod

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.


enyawix 06-13-2004 08:28 AM

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

KingofBLASH 06-13-2004 08:37 AM

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?


All times are GMT -5. The time now is 03:25 AM.