Operating System - HP-UX
1834827 Members
1974 Online
110070 Solutions
New Discussion

PVLINK "switchover" question

 
SOLVED
Go to solution
Stuart Abramson
Trusted Contributor

PVLINK "switchover" question

The SAN Team here is doing some SAN maintenance this weekend.

So, they're going to shut down Fabric A and do some work, and then bring it back up. Then they are going to shut down Fabric B, do some work, and bring it back up.

We have two HBAs in our servers with PVLINKS (Alternate Links). In each server one of the HBAs connects to Fabric A and one to Fabric B.

So, I'm checking on the impact of this SAN work on our servers. Here is a scenario with questions:

1. Fabric A goes down.
2. Path A to PV01 goes down.
3. Since Path A was "primary path" LVM detects failure and switches access to Path B (which is the other HBA on Fabric B.).
4. Path A comes back up.
Q1: Will LVM detect path came back and re-place Path A to PV01 back in VG? I think that it will.
Q2: But, access is happening on Path B. So, now Path B continues to be access path. Path A, which used to be "primary" is just sitting there.
5. Wait 15 minutes.
6. Path B goes down.
7. Access switches to Path A.
8. Path B comes back.
9. LVM re-adds Path B to VG.
10. "Primary" access continues on Path A.

Is this correct? I don't have to manually re-add paths back into the VG do I? It will all happen automatically, right?
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: PVLINK "switchover" question

I would not have any open databases going due to the possibility of mistake.

My understanding however is that the paths should failover without manual intervention.

SEP
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
Kent Ostby
Honored Contributor

Re: PVLINK "switchover" question

I'm not sure , but you can always use pvchange to manually change over.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Stuart Abramson
Trusted Contributor

Re: PVLINK "switchover" question

I know from experience that the paths will fail over without manual intervention the first time.

The question is will the paths be automatically incorporated BACK into the VG when they come back. So that they can fail over the 2nd time?
Jean-Luc Oudart
Honored Contributor

Re: PVLINK "switchover" question

Hi

if you access the HPcookbooks / chap 16 LVM
/-------
Physical Volume Links (aka PV Links or Alternate Links) are a High Availability Feature of
LVM which allows to configure multiple links (HW paths) to the same PV for redundancy.
One of them is considered as the primary link while the others act as alternate links. If LVM
detects the primary link beeing unavailable as a consequence of a failure (e.g. of a SCSI/FC
card/cable) it re-routes IO traffic to the first available alternate link.
/------

Regards
Jean-Luc
fiat lux
David Child_1
Honored Contributor

Re: PVLINK "switchover" question

Your assumptions look fairly accurate. In our environment we have done similar things many times. I agree that it would be best to shut down any databases, but that is often not possible.

I am pretty sure your answer to Q1 is correct, but I don't remember how long it took. Its not very long though. Q2 - I'm not sure how it all works, but once the system sees the primary as back up it should start shift new I/O back to the primary. Either way, once path B goes down it will switch over to A.

You will not have to manually add anything back in.

If any of your applications/databases are access the raw disks (e.g. /dev/dsk/c5t7d0) then you will run into problems, but I doubt this is your case.

David
Patrick Wallek
Honored Contributor
Solution

Re: PVLINK "switchover" question

When the paths come back, yes they will be reactivated in the VG.

If you watch syslog.log you will see messages like:

May 13 10:19:34 systemname vmunix: LVM: Recovered Path (device 0x1f060300) to PV 0 in VG 5.
May 13 10:19:34 systemname vmunix: LVM: Recovered Path (device 0x1f041200) to PV 2 in VG 5.
May 13 10:19:34 systemname vmunix: LVM: Recovered Path (device 0x1f061300) to PV 3 in VG 5.

or like:

May 13 10:19:34 systemname vmunix: LVM: Restored PV 0 to VG 1.
May 13 10:19:34 systemname vmunix: LVM: Restored PV 1 to VG 1.
May 13 10:19:34 systemname vmunix: LVM: Restored PV 1 to VG 5.

when the paths come back online.
Victor BERRIDGE
Honored Contributor

Re: PVLINK "switchover" question

Hi,
Q1: Yes if correctly configured

Q2:? Dont get you here

Usually I have nothing to do when e.g microcode upgrade is done to our HDS (XP1024)
Was not the case for other os like ai... but things have changed since...
I you ar fully LVM (HP) with no added software then you are fine...

The maintenance team brings down path A, you get in your syslog.log big insults then it will say switched to
When finished with A maintenance team brings it back up: in syslog.log it will discover the link is up again and after will switch back to it ...
then it the turn of B side...

I say well configured - Its transparent...
I will look and see if I can find some extracts of logs for you...

All the best
Victor
Jean-Luc Oudart
Honored Contributor

Re: PVLINK "switchover" question

Hi again,

pvdisplay /dev/dsk/c2t1d3
--- Physical volumes ---
PV Name /dev/dsk/c2t1d3
PV Name /dev/dsk/c1t0d3 Alternate Link
VG Name /dev/vg07
PV Status available
Allocatable yes
VGDA 2
Cur LV 27
PE Size (Mbytes) 4
Total PE 17005
Free PE 0
Allocated PE 17005
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

If Autoswitch is on then the link will switch back to primary when available again.

Regards
Jean-Luc
fiat lux
Stuart Abramson
Trusted Contributor

Re: PVLINK "switchover" question

Thanks all. The concensus is that the switching back and forth will be automatic with no interruption in production - but be careful!