Operating System - HP-UX
1829596 Members
2224 Online
109992 Solutions
New Discussion

Setup alternate links to physical volume

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Setup alternate links to physical volume

Hi All,

I have some idea and questions about seting up alternate links to physical volume if I am having two paths to a single LUN.

The follwoing device files are created for a single LUN.

/dev/dsk/c3t0d0 /dev/dsk/c5t0d0

My Questions:

1)If I am execuing following command:

#vgcreate /dev/vg01 /dev/dsk/c3t0d0 /dev/dsk/c5t0d0


my understandins:

When we indicate two device file names both referring to the same disk using vgcreate, LVM configures the first one as the primary link and the second one as the alternate link.

We do not run pvcreate on the alternate link; it must already be the same physical volume as the primary link.

Questions:

1.1)Are above statements correct?

1.2)Will both files be dispalyed in vgdispaly and lvdisplay? how will they look?

1.3)Does LVM bring the alternative link to online automatically if primary fails?

1.4)Does LVM bring back the primar link back to online automatically if it is working again?


2)For example I have created one VG with PV /dev/dsk/c4t0d1. Now I am extending the VG with device file /dev/dsk/c4t0d0 pointing same LUN.

#vgextend /dev/vg02 /dev/dsk/c4t0d0

Understandings:

LVM automatically configures "/dev/dsk/c4t0d0" as alternative link to /dev/dsk/c4t0d1.

Am I correct?


3)Can we use below command to bring alternative link to online even if primary link exists?

#pvchange -s


4)Does LVM bring back the primar link back to online if it is working again unless we have mentioned the command previously "pvchange -S n "?

5 REPLIES 5
Patrick Wallek
Honored Contributor
Solution

Re: Setup alternate links to physical volume

1.1) Yes

1.2) A portion of vgdisplay output:

PV Name /dev/dsk/c17t0d3
PV Name /dev/dsk/c19t0d3 Alternate Link
PV Status available
Total PE 2559
Free PE 766
Autoswitch On
Proactive Polling On

1.3) Yes. You will get a message in /var/adm/syslog/syslog.log that the path switched to the alternate link.

1.4) I don't recall.

2) Yes, but those are unusual device files to be pointing at the same LUN.

3) Yes

4) I think it depends on if LVM thinks the primary is "better" than the alternate (whatever that means).
Viktor Balogh
Honored Contributor

Re: Setup alternate links to physical volume

Hi,

After a LUN path switch you'll get a message like this in syslog:

May 10 10:40:27 rx1620 vmunix: LVM: Performed a switch for Lun ID = 0 (pv = 0xe00000016441c000), from raw device 0x1f140600 (with priority: 2, and current flags: 0x40) to raw device 0x1f040600 (with priority: 0, and current flags: 0x80).

And this confirms that a link is failed, but the PV is still accessible by the alternate path:

May 10 10:40:27 rx1620 vmunix: LVM: VG 64 0x060000: PVLink 31 0x140600 Failed! The PV is still accessible.

If both pathes will fail, or there is something bad with the disk happened, you'll get this:

LVM: VG 64 0x000000: PVLink 31 0x020000 Failed! The PV is not accessible.

If a path comes back, it appears in syslog like this:

LVM: VG 64 0x000000: PVLink 31 0x020000 Recovered.

****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: Setup alternate links to physical volume

From the message

LVM: VG 64 0x060000: PVLink 31 0x08f000 Failed! The PV is still accessible.

the 31 is the major number which is a disk:

# lsdev -b 31
Character Block Driver Class
188 31 sdisk disk
#

The 0x08f000 is a minor number:

# ll /dev/dsk | grep 0x08f000
brw-r----- 1 bin sys 31 0x08f000 Jan 27 2005 c8t15d0
#

****
Unix operates with beer.
Bijeesh
Respected Contributor

Re: Setup alternate links to physical volume

4)

If the primary link become down,LVM bring the alternate link automatically .Also once the primary link become up,LVM automatically bring back from alternate link to primary link.
senthil_kumar_1
Super Advisor

Re: Setup alternate links to physical volume

Hi All,

Can we use same method in linux (redhat and suse) to configure alternate path.