multiple usb drives

Rick Stevens rstevens at vitalstream.com
Wed Aug 16 20:31:52 UTC 2006


On Wed, 2006-08-16 at 11:54 -0700, chuck lawrence wrote:
> greetings,
> 
> I've got an interesting problem.  I've got 3 external usb drives, all 
> running thru a usb 2.0 pci card.  the first two (sda and sdb) are 
> roughly the same vintage.  the most recent addition, a year later, is a 
> larger, faster disk.
> 
> when I boot with them all on, the new disk wants to be sda, rather than 
> sdc.  I surmise this may be because it's a faster disk, and registers 
> first.  I was mounting volumes from the older disks in /etc/rc.local, 
> but now must mount manually, powering up the new disk after booting. 
> claerly this is less than ideal.
> 
> is this an inherent problem with multiple external usb drives?  I could 
> reorder the mount sequence, but it makes me a bit wary that I can't 
> control which disk is which.  should I not try to mount them at boot time?

The problem is that there's no way to control how the drives come up.
The system does a scan of the USB drives and assigns them drive letters
depending on the order in which they became available.  The same thing
can happen with SCSI...it depends on how fast the drives spin up, etc.

This is the ONLY time I recommend filesystem labels.  If the drives are
Linux filesystems, then label them.  To do this, figure out which drive
is what right now and what you really want them to be.  Let's say the
three drives are a 10G, a 20G and an 80G, and you want them to be known
as "drive1", "drive2" and "drive3" respectively.  Find out which drive
is /dev/sda NOW (let's say it's the 20G drive).  Label the filesystem
on it via:

	e2label /dev/sda1 drive2

And repeat for each of the drives/filesystems.  Then change your
/etc/fstab entries to reflect the names you gave the filesystems.  For
example, if you want the 20G drive to mount at, say, "/usr/drive2", then
put in a line:

	LABEL="drive2"	/usr/drive2	ext3	defaults	0 0

Then, WHENEVER that drive is plugged in, it'll get mounted as
/usr/drive2.

Now, if the filesystems are not Linux filesystems (e.g. VFAT), you're
kinda stuck.  There are games you can play in hotplug and udev to deal
with that, but it depends on setting up rules to look at the USB ID
strings and setting things up that way.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
- If at first you don't succeed, quit. No sense being a damned fool! -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list