2004-03-15 09:27:42

by Christoph Pleger

[permalink] [raw]
Subject: Hotplug with Kernel 2.6

Hello,

When I hotplug (or unplug) a USB mass storage device, I want to find out
which SCSI device (for example, /dev/sda or /dev/sdb) is (was) assigned
to that USB Device. Is it possible to do that with the help of the
variables which are passed to the hotplug scripts by the kernel?

Christoph


2004-03-15 09:51:00

by Daniel Drake

[permalink] [raw]
Subject: Re: Hotplug with Kernel 2.6

Hi,

Christoph Pleger wrote:
> When I hotplug (or unplug) a USB mass storage device, I want to find out
> which SCSI device (for example, /dev/sda or /dev/sdb) is (was) assigned
> to that USB Device. Is it possible to do that with the help of the
> variables which are passed to the hotplug scripts by the kernel?

Not a direct answer to your question, but you might want to try udev. You can
set up rules so that your USB storage device always becomes /dev/usb_hard_disk
or another name of your choosing (as well as the automatic /dev/sdX).

Daniel