Re: USB Drives (Revisited)

From: Joshua Kugler <joshua.kugler@uaf.edu>
Date: Tue Oct 25 2005 - 10:46:17 AKDT

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-----

-- 
Joshua Kugler
CDE System Administrator
http://distance.uaf.edu/
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Oct 25 10:50:38 2005

This archive was generated by hypermail 2.1.8 : Tue Oct 25 2005 - 10:50:39 AKDT