Skip to contentSkip to conversation

custom names for each slot in a multislot usb reader

DISCUSSION Samuel Liddicott 2 participants 3 messages Mar 15, 2005 – Mar 17, 2005

lore
Share & tools
lore
#0 lore raw

I have a multislot usb reader that gets assigned sda,sdb,sdc,sdd as the main block devices.

I can't work out what rules I need so that sdc becomes /dev/mmc and sdd becomes /dev/smartmedia etc

Now I can do rules to match the device and /dev/hda - but this will only work if my other usb thumbrive isn't handled first.

So I really need a rule to match on LUN.

Sam

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 10 lines · Samuel Liddicott

I have a multislot usb reader that gets assigned sda,sdb,sdc,sdd as the main block devices.

I can't work out what rules I need so that sdc becomes /dev/mmc and sdd becomes /dev/smartmedia etc

Now I can do rules to match the device and /dev/hda - but this will only work if my other usb thumbrive isn't handled first.

So I really need a rule to match on LUN.

Try:
udevinfo -a -p /block/sda
udevinfo -a -p /block/sdb
...

You will find keys here that are different for every slot, but independent of the kernel enumeration. I have one reader that already has names for the slot one other has numerical id's to match.

Kay

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Samuel Liddicott
Quoted 4 lines · Kay Sievers
Quoted 2 lines · Samuel Liddicott

I can't work out what rules I need so that sdc becomes /dev/mmc and sdd becomes /dev/smartmedia etc

Quoted 8 lines

Try:
udevinfo -a -p /block/sda
udevinfo -a -p /block/sdb
...

You will find keys here that are different for every slot, but independent of the kernel enumeration. I have one reader that already has names for the slot one other has numerical id's to match.

Thanks

Based on that advice, these rules work:

BUS="scsi" SYSFS{model}="Flash XL CF" SYSFS{vendor}="Medion*"
NAME{all_partitions}="media/compactflash"

BUS="scsi" SYSFS{model}="Flash XL MS" SYSFS{vendor}="Medion*"
NAME{all_partitions}="media/memorystick"

BUS="scsi" SYSFS{model}="Flash XL MMC/SD" SYSFS{vendor}="Medion*" NAME{all_partitions}="media/securedigital"

BUS="scsi" SYSFS{model}="Flash XL SM" SYSFS{vendor}="Medion*"
NAME{all_partitions}="media/smartmedia"

Sam

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel