Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 identical Western Digial Elements 1,5 TB external harddrives, but they are causing some problems when they mount. The problem is that the OS sees them as identical drives with the same identifier. I'll give an example.

HDD 1:
Location /dev/sdc

HDD 2:
Location /dev/sdd

So i edited /etc/fstab and mounted /dev/sdc to /mnt/drive1, and /dev/sdd to /mnt/drive2, and this works as expected. But once in a while after i reboot the OS i confused and HDD 2 is suddonly at /dev/sdc instead of /dev/sdd. So the wrong HDD is mounted to the wrong place. This of course is causing problems since the files and folders that i expect to be at /mnt/drive1 actually are at `/mnt/drive2``

Is there a way for me to give the drives a different identifier so that this doesn't happen?

share|improve this question
up vote 3 down vote accepted

You can use UUIDs instead of the /dev/... device names.

Do this:

sudo blkid

to get a list of UUIDs and then replace the /dev/sdc bit of fstab with UUID=xxx-xxx-xxxx

See Ubuntu's UUID docs for details.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .