cancel
Showing results for 
Search instead for 
Did you mean: 

Lun Lock on redhat/SuSe

 
kevin leong
Frequent Advisor

Lun Lock on redhat/SuSe

Dear Expert ,
May I know how to fix the scsi disk path on linux?

Currently my Lun Lock is /dev/sda=150Mb ,after i create new lun .The Lun Lock become /dev/sdb .HOw could I fix /dev/sda=150Mb as permanent .

Thanks
LeongKO
6 REPLIES
Ivan Ferreira
Honored Contributor

Re: Lun Lock on redhat/SuSe

Red Hat does not have an option to do that, the way to deal with it is to use LABELS to mount the file systems. Set a label with e2label, and configure your fstab like this:

LABEL=mydata /mydata ext3 defaults 0 0

For SUSE, see:

http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/sles9/adminguide-sles9/ch03s08.html
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
kevin leong
Frequent Advisor

Re: Lun Lock on redhat/SuSe

HI ,
Do i need to set the lun lock path on the cluster scripts same as label ?

second ,
The Lun Lock can i mount on both server ?


Thanks
LeongKO
Ivan Ferreira
Honored Contributor

Re: Lun Lock on redhat/SuSe

What cluster software are you using?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
kevin leong
Frequent Advisor

Re: Lun Lock on redhat/SuSe

HI ,
I am using HP Linux serviceguard .

The cluster file .

LunLock=/dev/sda1 ,should i change to
LunLock=/mydata

Thanks
LeongKO
Ivan Ferreira
Honored Contributor

Re: Lun Lock on redhat/SuSe

On Red Hat, you can use devlabel o uudev to create a stable symbolic link that maps to a disk UUID. For example:

devlabel add â s /dev/my_stable_name â d /dev/sda

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: Lun Lock on redhat/SuSe

Let me correct my first answer. Red Hat provides devlabel to deal with disk device names that may change.

The devlabel software attempts to address the device naming issue in a different manner than file system labels. The devlabel software is run by Red Hat Enterprise Linux whenever the system reboots (and whenever hotpluggable devices are inserted or removed).

When devlabel runs, it reads its configuration file (/etc/sysconfig/devlabel) to obtain the list of devices for which it is responsible. For each device on the list, there is a symbolic link (chosen by the system administrator) and the device's UUID (Universal Unique IDentifier).

The devlabel command makes sure the symbolic link always refers to the originally-specified device â even if that device's name has changed. In this way, a system administrator can configure a system to refer to /dev/projdisk instead of /dev/sda12, for example.

Because the UUID is obtained directly from the device, devlabel must only search the system for the matching UUID and update the symbolic link appropriately.

# devlabel add -s /dev/my_stable_disk_name -d /dev/sda


So, in your configuration file, you will specify:

/dev/my_stable_disk_name

Instead of /dev/sda.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?