Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications


When a hard drive is moved to a other location in the machine or removed or by some reason it fails, then other device names will be changed that results in invalid references to other devices. To overcome this problem, instead of referencing device name we can use UUID of the device which is always unquie number.

Each device is given a name like hda1,hda2 etc(for IDE). or sda1,sda2 etc.  (for SCSI) under /dev direcotry but when a hard drive is moved to a other location in the machine or removed or by some reason it fails, then other device names will be changed that results in
invalid references to other devices. To overcome this problem, instead of referencing device name we can use UUID of the device which is always unquie number. For this we can use "devlabel" utility. To configure it follow the two simple steps:


1. Get the UUID of  device(like /dev/sdc1)
# devlabel printid -d/dev/sdc1

Output:

P:6195eabc-4631-4ed8-9514-ed8cd4679ed0


2. Create a symbolic link which point to UUID. In this example "myHDD" is name given to symbolic link

#devlabel add -u
P:6195eabc-4631-4ed8-9514-ed8cd4679ed0 -s /dev/myHDD


Output:
SYMLINK: /dev/myHDD

-> /dev/sdc1


Added /dev/myHDD to

/etc/sysconfig/devlabel


From this onward, you can use /dev/myHDD instead of /dev/sdc1. In some situation if /dev/sdc1 become /dev/sdc2 or /dev/sdc3, you need not worry because you are using /dev/myHDD which point to the actual HDD.





 
Rate This Article: poor excellent
 
Comments about this article
Simple and Good
writen by: nita1_in on 2009-07-28 02:25:47
Good
RE: Simple and Good written by nita1_in:

Comment title: * please do not put your response text here