Mounting USB devices with stable names

Robin Laing Robin.Laing at drdc-rddc.gc.ca
Fri Nov 10 19:13:16 UTC 2006


Mike McCarty wrote:
> I have an issue which will shortly be important to me, though
> in past it has not been a problem. It appears to me that it
> may be a general problem in some ways.
> 
> I have for some time used an external USB hard drive. I find that
> sometimes it must be mounted as /dev/sda1 and sometimes /dev/sde1,
> and have consequently made two entries in my /etc/fstab, and just
> live with what I have. This occurs even though the disc is always
> plugged into the same USB port.
> 
> I now have a USB FLASH drive, and so this is going to be more
> of a problem, as I have different file systems on those, and
> have a need to specify the mount NOT to be "auto" to ascertain
> the fs type, since I am overriding the default for the FLASH
> drive. In any case, the FLASH drive is also not always appearing
> as the same device. I don't want to have to become root and
> fiddle /etc/fstab every time I try to mount the FLASH drive.
> 
> I've seen others here with what appears to be a similar problem
> with running two ethernet ports, and not being able to know
> which will be eth0. I wonder whether this be related.
> 
> In any case, would some please give me advice on how to handle
> the "floating" USB devices?
> 
> Thanks very muchly for your time.
> 
> Mike

I label all my devices when I format them.  They then mount as 
/media/{label name}.

Heck, I the same name comes up on Mac's as well.  I would have to ask my 
wife or daughter.

All my SD cards and USB sticks are named so I know which is which if I 
have more than one plugged in at a time.

-- 
Robin Laing




More information about the users mailing list