In udev rules, the %k, %b, %n variables are nice and all, but you can also use the variables you’re comparing and setting such as ID_FS_TYPE, KERNEL, SUBSYSTEM, PHYSDEVPATH, etc. When you run a command in a udev rule, there’s nothing stopping you from calling a shell and executing a few commands without actually calling a standalone script to do the dirty work. If you write out the array of environment variables from inside an external program, you can get a better understanding of just which part of the device discovery is matching your rule and getting processed.
I know there’s already big companies making Virtual Tape Library (VTL) devices, but they’re expensive and I’m just looking for a cheap solution for testing. And it’s working quite well so far as a proof-of-concept for my needs.
After setting it up you should see a media changer and a …