I have a bunch of usb ports and hubs. When you attach usb thumb drives, Linux assigns them to virtual block devices on a first-come first-serve basis. It creates sdd, sde, sdf, and so on, regardless of which port I plug the drives into. We copy files onto these drives and when there is an error, it is impossible for me to tell which drive the error occured on.
What I'd like to do is configure udev so that it maps physical hardware devices/ports to specific virtual devices. That is, port 1 => sdd, port 2 => sde, port 3 => sdf, etc. This would allow me to tell which thumbdrive the error occured on.
I've found a few resources (e.g. http://reactivated.net/writing_udev_rules.html), from which, I can tell that this can be done. However I have no experience with such low level configurations. They are confusing to me.
Is there another reference that might make things clearer? Or perhaps some software which does it for me? Or a library that makes it easier?