Re: Hard drives with same UUID's
Part of the problem is that Ubuntu can mount drives in any of three ways. I suspect you're seeing the first two methods in play:
- By /etc/fstab entry -- Entries in /etc/fstab can mount a drive in a more-or-less permanent way, so that a given drive is always mount at, say, /media/foo. The problem is that "a given drive" depends on a unique way to identify the drive. The /dev/sd?? entries are subject to change for any number of reasons -- even truly random reasons like the order in which the drives are detected by the kernel as each one takes random time to be recognized. That's why most distributions, including Ubuntu, now favor UUID= or LABEL= entries in /etc/fstab. You can mount drives anywhere you like with this method -- in a subdirectory of /media, in a subdirectory of /home, in some made-up location (/pizmet/goom, say), or whatever.
- By a file manager's automounter -- Nautilus and other file managers will mount drives when you try to access them, if they aren't already mounted. Such mounts get put under /media, named either after the filesystem's name (if it's got one) or a UUID value (if there's no name).
- By manual mounting -- You can mount partitions using the text-mode "mount" command, as in "mount /dev/sdc1 /mnt". This method is used by old-school power users, but isn't much liked by recent Windows converts. I'm guessing you're not using this method.
As a general rule, for removable disks that you regularly plug in and unplug during a session, you're best off relying on the file manager's automounter. Give the filesystem a descriptive name and it will be mounted at a consistent location based on that name when you plug it in or try to access it. For this to work, you may need to remove or comment out any /etc/fstab entry for the filesystem in question. (Be sure not to remove entries for your main Linux installation, though!)
If the disk is always plugged in, OTOH, IMHO it's better to use /etc/fstab, since it's much more flexible. This method is also preferable if you need access to the disk through something other than a standard GUI login, such as a file server that runs on the computer. (Such a process won't trigger the automounter in a GUI file manager.) The caveat, though, is that since you're seeing drive identifiers change, you can't rely on /dev/sd?? device names to identify your disks; you've got to use UUID= or LABEL= notation.
Incidentally, those /dev/sd?? names are not mount points, as you've referred to them; they're device identifiers. Those files give access to the hardware on a low level. You should be using them (and caring about them) only insofar as you need to reference them in /etc/fstab or use them with disk utilities like mount, mkfs, fdisk, and GParted. In day-to-day use, if everything is set up correctly, it doesn't matter what those device identifiers are.
If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.
Bookmarks