Re: USB Drives (Revisited)

From: Greg Madden <pabi@acsalaska.net>
Date: Thu Oct 27 2005 - 06:21:00 AKDT

On Tuesday 25 October 2005 10:46 am, Joshua Kugler wrote:
> Comments below.
>
> On Monday 24 October 2005 00:15, Fielder George Dowding wrote:
> > A couple of weeks ago or so, Robert Crowe and I were concerned with
> > USB drives - how to identify them and where to mount them. Here are
> > some of my discoveries:
> >
> > 1. I am using Debian/GNU Linux with 2.6.x kernel with the "magic"
> > device system. That is, /dev is not full of a gazillion devices. It
> > does have some basic stuff, for example, I find the SCSI drive
> > devices: sda, sdb, sdc, and sdd with no SCSI (including USB drives)
> > attached.
> >
> > 2. The USB ports (there are six on this box: four in back and two in
> > front) are scanned in order at boot-up.
> >
> > 3. If I have the USB drive plugged in and turned on at boot, it
> > always is identified as /dev/sda1, /dev/sda2, ... etc.
> >
> > 4. If I have more than one such drive plugged in and turned on at
> > boot, I can predict which one is sda(1,2,...) and which one is
> > sdb(1,2,...) by where each is connected.
> >
> > 5. If I plug in after boot, the drive is identified as
> > /dev/sde(1,2,...) regardless of where it is plugged in.
> >
> > 6. If I plug in another drive after boot it will be identified as
> > /dev/sdf(1,2,...) regardless of where it is plugged in.
> >
> > Cheerio!
>
> I'm not sure how Debian works on hotplugging, but on my Mandriva system
> (10.2), when I plug in a drive, it inserts a line into fstab, and the
> mount point is the partition label on the drive (haven't tried it with
> a drive with multiple partitions yet...that would be interesting). So,
> at any rate, regardless of the /dev/sd* identifier, the mount point
> remains constanst. For example, in this case, my USB drive is formatted
> XFS with a label of BackupDrive. When I turn it on, after it scans, I
> have a line in /etc/fstab that has the device ID and the mount point.
> Regardless of when or where it gets put in the device tree, I can
> always "mount /mnt/BackupDrive"
>
> Does Debian have a similar facility?
>
> j----- k-----

I have to say I am only begginning to start to figure out the new
udev/pmount/hotplug stuff. These are the apps that do the automagic stuff
for Linux. AFAIk there is a config file in /etc/udev/udev.rules? that
allows the system to associate devices with mount points so that the same
device always gets the same mount point. Whether this is done by the
system or you have to modify the file yourself is beyond my current know
how. I may have to figure it out some day :-)

-- 
Greg Madden
Precision Air Balance, Inc.
Phone: (907)276-0461
email: pabi@acsalaska.net
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Oct 27 06:25:50 2005

This archive was generated by hypermail 2.1.8 : Thu Oct 27 2005 - 06:25:50 AKDT