udev removable media
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?
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?
I hope this is the right list to ask this.
Signature · 1 line
Roeland
Quoted 11 lines · Roeland Moors
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.
Quoted 4 lines
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