[TriLUG] finding udev renamed flashkeys

Joseph Mack NA3T jmack at wm7d.net
Sun Apr 12 11:11:17 EDT 2009


udev is a bit of a mystery to me (like taxes).

I need to know whether a flashkey is mounted and if so 
where.

To see if there's one plugged in, I look in 
/proc/partitions. If so I see /dev/sda*

My udev rules will translate this to /dev/pny* (say)
and my automount rules will mount it at /pny (say).

I would like to be able to look somewhere to see what disks 
are on the machine. Currently I'm looking in 
/proc/partitions (or /proc/diskstats) and find sda*. I need 
to be able to connect that to the udev'ed name (/dev/pny*) 
which appears in the mount table. However there's no 
connection (that I can find, eg in /sys) to connect 
/dev/sda* and /dev/pny* (except the device major and minor 
numbers).

One solution that would work would be if the flashkey showed 
up in /proc/partitions as /dev/pny*

Any suggestions?

thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list