Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.