-   Linux - Distributions (
-   -   suse 9.1 device mapping for usb drives (

cj12345 09-10-2004 07:44 AM

suse 9.1 device mapping for usb drives
I use two usb devices regularly: a pen drive and a removeable hdd. Trying to get these working nicely under Suse 9.1 pro is really irritating me.

First off, I've done all the things mentioned by Vlad (in thread # 207303 - thanks) and it all works ... except for one thing.

I've discovered that the only thing that seems to control which /dev/sd?1 entry a usb device gets mapped is the ORDER in which it is plugged in. The first device I plug in is always sda1, the 2nd sdb1 etc. Irrespective of which slot I plug them in to, or which device I plug in first.

This is a real pain. I would like it so that I know that if I plug in my removeable hdd, then it will always be (say) /dev/sdb1, irrespective of whether or not I've previously plugged in a ped drive since rebooting. If that isnt possible, next bvest would be to know that a given usb slot on my PC will map to a given /dev entry .

Does anyone know of a better solution to this?

At present what I do is:
1. Plug device into slot
2. tail /var/log/messages to see which /dev/sd?1 device itse decided to appear as
3. mount that device

Incidentally - and I dont know whether this is related - but when I unplug the (unmounted) usb storage device, I always get a log message like this:

/etc/hotplug/usb.agent[6437]: need a device for this command

I'm running:
kernel 2.6.4-52-default

sacerdoti 04-11-2005 02:18 PM

usb-storage device mapping
I am having the same issues...

I need to look at /proc/partitions and answer the question: "is this device a USB drive?" My program cannot interpret the lines in syslog.

There must be a way in linux 2.6 to determine what /dev/sdxx device is mapped to a given usb-storage drive, but the answer is not (yet) obvious.

I would expect it in /proc/bus/usb/devices somewhere, but that is not the case.


All times are GMT -5. The time now is 09:00 PM.