[plug] Dealing with multiple removable devices

Bernd Felsche bernie at innovative.iinet.net.au
Wed Aug 6 14:55:36 WST 2003


On Wed, Aug 06, 2003 at 02:16:29PM +0800, Tsuki-yomi wrote:
> This is a problem I've been dealing with on and off for a while now and no 
> real solution has presented itself so I thought I ask if anyone had an 
> idea.
> 
> I have two removable devices, an iPod and a USB flash disk.
> 
> If I connect the iPod first it grabs /dev/sda.  However if I connect the 
> USB  flash disk first *it* grabs /dev/sda.
> 
> This wouldn't be a problem but the data partition on the ipod is 
> /dev/sda2, while on the flash disk it's /dev/sda1.
> 
> Is there any way of telling the system "this device gets this dev number"?

Yep, use "permanent" names based on SCSI-ID or the device
characteristics using SCSI aliasing to define names in /dev/scsi.

I've got a package called "scsi" under SuSE that includes the
scsidev command which parses a definable table of aliases and the
devices to establish.

Have a look at
	http://www.garloff.de/kurt/linux/scsidev/
an earlier version is at
	ftp://tsx-11.mit.edu/pub/linux/BETA/scsi/

My config file contains

id=00 manufactuter=RICOH model=MP6200S rev=2.03 devtype=generic alias="cdwriter"
id=02 manufacturer=ARCHIVE model="Python 27871-XXX" rev=1210 devtype=tape alias="dat"
id=03 manufacturer="" model="Scanner 636A4" rev=1.50 devtype=generic alias="scanner"
id=04 manufacturer=CANON model=IX-27025E rev=1.12 devtype=generic alias="filmscanner"
manufacturer=SONY model="DVD-ROM DDU1621"  rev="S1.3" devtype=cdrom alias="sonydvd"
manufacturer=PIONEER model="DVD-RW  DVR-105"  rev="1.00" devtype=cdrom alias="dvdwriter"

Redundant information is permitted!

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!



More information about the plug mailing list