Operating System - Linux
1825721 Members
3134 Online
109687 Solutions
New Discussion

Re: How to change pseudo device name ?

 
yyghp
Super Advisor

How to change pseudo device name ?

Hi there,

I presented 2 LUNs on EVA5000 to 2 different servers, and used QLogic multipath driver to combine 8 paths to 2:

[root@srsA /]# lssd
sda 0,0,0,2 COMPAQ HSV110 (C)COMPAQ 3020 5000-1fe1-5004-569c
sdb 0,0,2,3 COMPAQ HSV110 (C)COMPAQ 3020 5000-1fe1-5004-5448

[root@srsB /]# lssd
sda 0,0,0,3 COMPAQ HSV110 (C)COMPAQ 3020 5000-1fe1-5004-5448
sdb 0,0,2,2 COMPAQ HSV110 (C)COMPAQ 3020 5000-1fe1-5004-569c

But I notice that on SrsA, /dev/sda points to LUN#1, /dev/sdb points to LUN#2; while on SrsB, /dev/sda points to LUN#2, /dev/sdb points to LUN#1
/dev/sda(b) is the virtual pseudo device file generated by QLogic Multipath driver, how can I make them point to the same LUN on both servers? that is, "/dev/sda" both point to LUN#1, "/dev/sdb" both point to LUN#2
Thanks!
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: How to change pseudo device name ?

Best bet is to work on the SAN and change the LUN number if possible.

There are procedures for renumbering instances but they are risky and sometimes not supported by the various Linux distributions.

SEP
Rapid City, SD
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
yyghp
Super Advisor

Re: How to change pseudo device name ?

hi SEP,

Could you please tell me the detail about how I can change the LUN number on the SAN side to make this work ?
Thanks!
Ivan Ferreira
Honored Contributor

Re: How to change pseudo device name ?

Device special file are created in a dynamic way, if you add more disks/vdisks in the future, the device special file may change again. If you are going to use a cluster file system like ocfs, you may use a LABEL in the filesystem to mount it, so you don't have to worry about device special file naming.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
yyghp
Super Advisor

Re: How to change pseudo device name ?

Hi Ivan,

But the Oracle guy who is going to install RAC on these two servers asked for same device file to the same LUN, that's the requirement to run those RAC configuration scripts, he said...
Thanks!
Ivan Ferreira
Honored Contributor

Re: How to change pseudo device name ?

They may be right, so, ask them if they need the lun to be the same only at installation time, and then may be modified. If this is the case, you can do the following:

Unpresent sda from srsB.
Reboot srsB.
sdb will be detected as sda.
Present the vdisk again.
Without reboot, download and run rescan-scsi-bus.sh
The devices will be the same in srsB and srsA, but at next reboot will stay different again.

So, if you don't need that the device files be the same after initial installation (using the LABEL to mount the filesystems), this may be a workarround.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Uwe Zessin
Honored Contributor

Re: How to change pseudo device name ?

From looking at the controller WWPNs, the LUN mapping is the same. The 'problem' appears to be that the virtual disks are online to different controllers and thus served by different controller ports - an absolutely reasonable setup.

This swapping of devices on different targets can easily happen in the fibre channel world.

What you need is called 'persitent binding'. It is used to make sure a LUN is always mapped to the same device name. Look back into your previous thread:
http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=939917

Greg Vaidman has already given you a link to the manual which describes this.
.