Automatically distinguish difference between multiple HDDs in linux?
Posted
by Jakobud
on Super User
See other posts from Super User
or by Jakobud
Published on 2010-02-14T07:38:35Z
Indexed on
2010/03/15
7:50 UTC
Read the original article
Hit count: 264
I'm running Ubuntu Server 9.10. I have two external USB HDDs. I use them each for different backup reasons. So certain data gets stored on one HDD, and different information gets stored on the other HDD.
I want to make a script that can look at the external HDD can determine which HDD it is, so that it can copy the proper information to it. Is there a way for Linux to determine this? Like if I see one HDD as /dev/sdc1, then unplug it and plug in the other HDD, should Linux see it as /dev/sdd1 or will it be /dev/sdc1?
I'm a bit of a Linux newb and I don't quite understand how it determines the /dev/sdxx values that it assigns to drives.
© Super User or respective owner