Operating System - HP-UX
1834571 Members
2811 Online
110069 Solutions
New Discussion

Re: Hardware driver paths switching (Fiber Channel)

 
SOLVED
Go to solution
aaa_37
Occasional Contributor

Hardware driver paths switching (Fiber Channel)

Hi All,
I need to know following

1. If there are two FC paths (like c3t0d1 and c4t0d1) between disk enclosure and server, one will be primary and other will be alternate link. How can I switch between these two paths.

2. How can I know which is the primary link and which is alternative link

3. How can I know link is working fine or not

I am using N-Class server with F10 disk enclosure connected with FC.

Thanks in advance.

Venki
8 REPLIES 8
Solution

Re: Hardware driver paths switching (Fiber Channel)

1. LVM will swicth itself if a problem occurs. You can do this manually if you wish using pvchange -s

2. use vgdisplay -v

3. LVM will report errors in syslog

HTH

Duncan

I am an HPE Employee
Accept or Kudo
James R. Ferguson
Acclaimed Contributor

Re: Hardware driver paths switching (Fiber Channel)

Hi:

1. To switch a LVM pvlink (alternate link). simply 'vgreduce' the primary link. The secondard link will be promoted to the primary (and only link). Then 'vgextend' the original primary link (device) making it the new secondary link.

2. The primary link will be the first device file in /etc/lvmtab whereas the secondary link will be listed after it. Another, easier way to deduce the primary and alternate links is to do:

# vgdisplay -v /dev/vgXX

In the listing of physical volumes, the alternate (secondary) link will be clearly designated.

3. LVM does not load balance I/O between primary and alternate links. You can test the viability of the alternate link by swithing the primary to the alternate.

Regards!

...JRF...
Tim D Fulford
Honored Contributor

Re: Hardware driver paths switching (Fiber Channel)

1 - The way I would do it is
# vgreduce /dev/dsk/cXtYdZ, then add it back in
# vgextend /dev/dsk/cXtYdZ,
or possible
pvchange -S y /dev/dsk/cXtYdZ, sets disk as primary

2 # pvdisplay /dev/dsk/CXtYdZ --shows if it is a primary of secondary OR
# vgdisplay -v -- this shows all the disks primary & alt at the bottom

3 LVM does this for you. But
# ioscan -fnCdisk -- Check disk status & make sure it is CLAIMED
# pvdisplay /dev/dsk/CxTYdZ -- This checks if LVM sees disk
# diskinfo /dev/rdsk/cXtYdZ -- This shows if OS likes disk
# dd if=/dev/rdsk/cXtYdZ bs=64k count=16 of=/dev/null -- check if you can read 1MB of data from disk

Tim
-
Steve Lewis
Honored Contributor

Re: Hardware driver paths switching (Fiber Channel)

If your VG already has c3t0d1 as primary and c4t0d1 as alternate, just type

pvchange -s c4t0d1

It knows from the lvmtab and VG info that c4t0d1 is the alternate path for c3t0d1 so it makes the switch automatically.

If your VG does not already have the alternate path configured then you have to add it using vgextend /dev/vgNN /dev/dsk/cXtYdZ before you pvchange.

Tim D Fulford
Honored Contributor

Re: Hardware driver paths switching (Fiber Channel)

Point of clarification between me & ..JRF..

JRF is correct the alternate link does not take IO throughput, it is effectively a hot standby (as far as LVM is concerned). But you can use my suggestions to check if alternale link is still operationl or use JRF's suggestion of vgreduce...

Tim
-
Tim D Fulford
Honored Contributor

Re: Hardware driver paths switching (Fiber Channel)

Mr butter-fingers again.....

pvchange -s /dev/dsk/cXtYdZ NOT pvchange -S y ...

Tim
-
James R. Ferguson
Acclaimed Contributor

Re: Hardware driver paths switching (Fiber Channel)

Hi (again):

As noted, there are two ways to switch the primary and alternate links. The first is to use 'vgreduce'/'vgextend' as described in my earlier post. The second method, as noted, is to use 'pvchange -s /dev/dsk/cXtYdZ'.

The essential difference is that 'vgreduce'/'vgextend' changes the order of the device files in '/etc/lvmtab' while 'pvchange' does not. It is this order that determines which device file is the primary (first) and which device file is the alternate (second) link. Hence, to permanently swap primary and alternate links, use 'vgreduce'/'vgextend'. This is useful when balancing I/O configurations between two controllers.

Regards!

...JRF...
Shujaat Hussain
Occasional Advisor

Re: Hardware driver paths switching (Fiber Channel)

Hi,

I would like to add this that whenever making any changes to Primary or Secondary paths, always check Disk Time out values. You can see the Time out value through "pvdisplay -v /dev/dsk/xxx " command. You can change the timeout valuse by using "pvchange -t " command. Some applications or databases are sensitive to these timeout values. Just a thought. Good luck.

Regards.

Shujaat