Re: udev removable media

Greg KH
2004-09-03T11:43:46Z

On Fri, Sep 03, 2004 at 01:28:33PM +0200, Roeland Moors wrote:
> I have an USB zip drive in combination with udev.
>
> When I connect the drive with a disk inserted, everything works
> fine. Here is the udev rule:
> BUS="usb", SYSFS{product}="USB Zip 750", KERNEL="sd?1",
> NAME="%k", SYMLINK="zip"
>
> When connecting the drive without a disk the symlink is not
> created. This is ok, beceause there is no disk.
>
> But if I now insert a disk, there is still no symlink?

That's because we don't get a "media inserted" event, sorry.

> I've search a bit on google and if I understand correctly the
> main problem is the SCSI protocol.
>
> Is there a solution to this problem?

You can use the "all_partitions" solution in udev to always create the
partition device nodes. See the udev manpage for more information.

thanks,

greg k-h