Operating System - HP-UX
1847253 Members
4227 Online
110263 Solutions
New Discussion

Re: vgchange options in SG

 
UniRock
Regular Advisor

vgchange options in SG

Hi All,

I have few questions about ServiceGuard. I have also gone through admin guide but still doubts are persistent.
For example, cluster is up; package is down; VG is deactivated on nodes; we start the package; everything runs fine (including VG activation).

But then, WHY and WHEN do we require "vgchange" options like "-c y", "-c n", "-a e", "-a y" etc.
Are these only for troubleshooting purpose??

Thanks in advance..
Good points assured ;)
11 REPLIES 11
Michael Steele_2
Honored Contributor

Re: vgchange options in SG

Hi

-c is for each node in the cluster. It's a sharing of ownership mechanism for LVM.

-c y - yes share to other nodes

-c n - no share

-a e - activate in exclusive read / write - so the other nodes don't take control of the vg when used on another node

-a y - activate true - won't mount the file systems if not activated.
Support Fatherhood - Stop Family Law
Raj D.
Honored Contributor

Re: vgchange options in SG

Unirock,

Normally a vg is available fr use if it has been activated: can be activated with:
# vgchange -a y vgxx
Then mount the FS, work with lv , raw lv... etc....

To deactivate :
# unmount fsss..lvss..
# vgchange -a n vgxx



However in Service Guard Environment , Serive gurad cluser can use a VG if is made cluster aware, that means it adds a cluster flag/id on that vg:
This is done during setting up the cluster.
with vgchange -c y vgxx option.

And to activate # vgchange -a e vgxx
[ It will be activated exclusively , as it is shared vg between the nodes , and any node can activate the vg on request. ]

This options are alrady in the package control script and during package startup it takes care of it. However in case of packge failed to start, and you try to activate the vg, it won't actiavet with just # vgchang -a y , because it is cluster vg.
So you have to use:
# vgchange -a e vgxx
[ As already having cluster aware flag on it]



Similarly to deactivate a cluster aware vg , vgchange -a n will not work, you have to make it cluster unaware:

- Make sure lvs are not in use or mounted.
Then
# vgchange -c n vgxx
# vgchange -a n vgxx




Cheers,
Raj.

" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: vgchange options in SG

Also remember
To make a vg cluster aware:
---> the cluster must be running.
cmviewcl should be showing that the cluster is UP/running.

If you try to make a vg cluster aware and want it to be the part of a High Availability service guard package, you have to run # vghange -c y vg_name
(This is needed during initialization of the vg as cluster aware at the time of creation of the cluster.)

This is also mentioned in the pkg control script:

Check : any pkg control script :
/etc/cmcluster/pkg/pkg.cntl

# VOLUME GROUP ACTIVATION:
# Specify the method of activation for volume groups.
# Leave the default (â VGCHANGE=â vgchange -a eâ ) if you want volume
# groups activated in exclusive mode. This assumes the volume groups have
# been initialized with â vgchange -c yâ at the time of creation.




Also further reading:
http://docs.hp.com/en/B2355-60127/vgchange.1M.html

http://docs.hp.com/en/B3936-90100/B3936-90100.pdf


Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Johnson Punniyalingam
Honored Contributor

Re: vgchange options in SG

>>But then, WHY and WHEN do we require "vgchange" options like "-c y", "-c n", "-a e", "-a y" etc.<<

You can always check man pages for "vgchange"
lots of information with examples

vgchange -c "make the VG cluster aware" y|n - Yes/No

vgchange -a "activate volume group" y|n Yes/No

>>Are these only for troubleshooting purpose??

It depends on scenarios

Thanks,
Johnson


Problems are common to all, but attitude makes the difference
UniRock
Regular Advisor

Re: vgchange options in SG

Hi..

Package ctrl script takes care of VG activation etc but in case it fails and I want to activate VG manually and then run package;so for that, do we need to first activate (-a y) the VG and then make it cluster aware (-c y) ??

Thanks..
Johnson Punniyalingam
Honored Contributor

Re: vgchange options in SG

>>>I want to activate VG manually and then run package;so for that, do we need to first activate (-a y) the VG and then make it cluster aware (-c y) ?? <<<

if you want to activate manauly-

vgchange -c n /dev/vgXX
vgchange -a y /dev/vgXX

Once activated , you need manually mount file system which part of cluster pkg.

Once you have fixed the issue why "your pkg "
before you ru "pkg"

vgchange -c y /dev/vgXX

than you run your "pkg"

cmrunpkg -v -n


Hope this helps :)

Rgds,
Johnson




Problems are common to all, but attitude makes the difference
Suraj K Sankari
Honored Contributor

Re: vgchange options in SG

Hi,
>> do we need to first activate (-a y) the VG and then make it cluster aware (-c y) ??

If you run the package ctrl file then no need to do all this just run
#cmrunpkg
if this fails then you need to do all manually from activate to mount.

Suraj
Emil Velez
Honored Contributor

Re: vgchange options in SG


if your package does not start properly FIX IT and then your package will start properly. Your package script needs to be robust enought to start the package even if the other system went down hard.

You do not want to start the package manually except as part of testing why the package did not start.

What ServiceGuard giveth ServiceGuard should take away so let serviceguard control the package and if there is a failure fix it.

Michael Steele_2
Honored Contributor

Re: vgchange options in SG

Hi

To verify,
cmgetconf -p pkg1 | grep ^NODE_NAME
cmgetconf -p pkg2 | grep ^NODE_NAME
cmgetconf -p pkg1 | grep ^SERVICE_NAME
cmgetconf -p pkg2 | grep ^SERVICE_NAME
cmviewcl -v
Support Fatherhood - Stop Family Law
Serviceguard for Linux
Honored Contributor

Re: vgchange options in SG

I'm not familiar with all of the veritas commands, but since SG supports two different volume manages this is an easy way to differentiate to two volume managers. This is in addition to some of the answers related to shared vs unshared volume groups.

Re: vgchange options in SG

Hi UniRock;

WHY: Yo need to use these commands manually in order to solve problems with package start/stop.

WHEN: Somethimes you can have some problems with your application (Not necessarily with the cluster or package commands), for example your database does not start or stop. In such situations you need to activate or deactivate the volume groups that are used with this application, then manually try to solve the application problem before controlling it through the cluster packages.

Best Regards

Alexander
The technology is a way to have a better life