LVM and VxVM

vg activation specifying one PV of the mirrors

 
Stuart Powell
Super Advisor

vg activation specifying one PV of the mirrors

I have a two node SG cluster that runs two packages. Normally each package activates a single vg that is mirrored between two arrays. The node and array pairs are divided between a main and secondary computer room. If we loose power to one room before the UPS expires we shutdown the package on the affected node. I would like to be able to start the downed package on the other node but specify that it only uses the PV on the array that is still powered, AND not sync the disks. Any suggestions on how to accomplish this feat would be appreciated?

Stuart
Sometimes the best answer is another question
9 REPLIES 9
John Poff
Honored Contributor

Re: vg activation specifying one PV of the mirrors

Hi,

I don't think you'll have to worry about it. If I understand you correctly, you have two disk arrays in two separate computer rooms. If one room loses power, the PVs should go away, but LVM should just keep going if the VG is setup properly. The PVs in the room that is down should show up as unavailable, but if they are mirrored with the second array it should just act like a disk failure.

I'm curious. What do you do for a cluster lock disk?

JP
Jeff Schussele
Honored Contributor

Re: vg activation specifying one PV of the mirrors

Hi Stuart,

I don't see why this would be necessary. If the "other" PVs are simply mirrors the system will just cease using them once they power off. You'll get error messages but the pkg should remain up. As long as the mirror PVs are available when the pkg moves it will come up on the standby node. If they're not available then you'd have to mount the VG with "no quorum enforcement" (-q n) command which would essentially ignore them then. And I'd rather *not* automate this - I'd want to know the mirrors are not available so I could work the issue & get them back ASAP.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Prashant Zanwar_4
Respected Contributor

Re: vg activation specifying one PV of the mirrors

When you say it is mirrored between arrays, I assume it is not LVM mirror, but is a Sync which happens between your primary and seconday arrya using a link and so.

When you say you want to activate the VG just using the PV from second array. It would be possible provided the defination you create for the VG on the second server will be using just the secondary PV.

How is your sync acheived between primary and seconday PV. Is it nightly or contineous. If it is nightly, and if one array goes down, at second server, you will have to fire takeover command. By default the PV's wont be in paired state, so that shall be taken care at the array level.

the infotmation you provided is not sufficient, what is the array and how the sync happens..
Please give some more information.
If it is LVM mirror, you will have to make the VG at other array using export and import using one PV only..you will have to do this in advance, just the VG shall have the secondary PV associated with it...


Hope this helps,
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Stuart Powell
Super Advisor

Re: vg activation specifying one PV of the mirrors

John,
Dual cluster lock disks; one on each array.
Mirroring is done on the OS with Mirror/UX, so it is an LVM issue.
The problem occurs when we have downed the package on the affected system, but the UPS still has the affected array alive. If we try to start up without changing the vgchange options the package will hang. If we try to start up and change the vgchange to include "-q n -s" I don't know if the array LVM will pick will be the unaffected array? We want to minimize out production down time, and could do so if we are able to control which PV we connect to at package start up.
Make sense?
Stuart
Sometimes the best answer is another question
Prashant Zanwar_4
Respected Contributor

Re: vg activation specifying one PV of the mirrors

I believe you shall try it once to check it goes through properly. You want to do it at the package startup, so you will have to mention in the package startup script, As this is only VG you are activating, I assume you do not have any other VG's to activate..You can use the -q n option.

You have to keep in place two package scripts, which will be normal startup and other will be without quorum startup.
Now the disk array is still on on the alternate power source.

Here you have to do some trick to exclude the another PV..

Hope this helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."

Re: vg activation specifying one PV of the mirrors

If you specify '-q n -s' on the vgchange, then it *will* only activate the PVs that are still accessible - surely those will be the ones in the array that is still powered on??

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Sanjay_6
Honored Contributor

Re: vg activation specifying one PV of the mirrors

Hi Stuart,

In your package startup script activate the vg using "no-quorom".

under the section "VOLUME GROUP ACTIVATION: " in the package control script, you can set this,

VGCHANGE="vgchange -a e -q n"

these are the parameters that are used while activating the vg for the package. -q n would mean it would try to start the vg without quorum if necessary.

Hope this helps.

Regds
Stuart Powell
Super Advisor

Re: vg activation specifying one PV of the mirrors

I need to be clearer on my quandry:

My question focuses on what to do before the affected array looses UPS power. Is there a way to activate a single PV when both sides of the mirror are still available?

Stuart
Sometimes the best answer is another question
John Palmer
Honored Contributor

Re: vg activation specifying one PV of the mirrors

The only way that you can activate the VG without the PV's that you *think* are going to fail is to remove them. i.e. lvreduce all your LV's and vgreduce your PV's. This is not a strategy that I'd recommend though.

What's wrong with just starting the package as normal,letting the PV's fail (the LV's will continue to function) and then when power is restored, the failed PV's will be resync'd automatically? Continuing that thinking, provided you've configured Serviceguard to activate your VG's with quorum override(as others have suggested and consider that this option is designed for your type of cluster), why do you do anything? You expect half your cluster to fail but it may not, power could be restored before the UPS expires. If power is lost, Serviceguard will start your failed package on the good node and it will use only the PV's that are available. Surely this will minimise your downtime.