USB drives and device names

Dan Coutu coutu at snowy-owl.com
Fri Jan 25 16:30:17 EST 2008


On Linux a USB connected hard drive appears as a SCSI device. But the 
naming of the device seems to 'float' based on who-knows-what criteria.

So for example yesterday I saw an USB drive device change from being 
/dev/std to /dev/stc. Talk about unique! I've seen the letter increment 
before when you disconnect a drive and reconnect it (the USB connection 
is what I'm referring to here) but never have I seen it decrement.

Is there any kind of algorithm that could be used, perhaps within a 
shell script, in order to reliably mount a USB drive without fail and 
without having to guess at the device name?

Thanks!

Dan


More information about the gnhlug-discuss mailing list