1836596 Members
3345 Online
110102 Solutions
New Discussion

How to VG status

 
SOLVED
Go to solution
Narasimham
Advisor

How to VG status

I am getting the output of "vgdisplay" as follows:
VG Name /dev/vgMlbb
VG Write Access read/write
VG Status available

I want that Vg status as:
VG Status available, exclusive

I am not sure how to change that.The VG is currently active.Can any one help me in changing the VG status

Narasimham
9 REPLIES 9
Helen French
Honored Contributor

Re: How to VG status

Hi,

For activating the VG in exclusive read-write access, use 'e' option with the 'vgchange' command.

# vgchange -a e /dev/vg01

HTH,
Shiju
Life is a promise, fulfill it!
Sridhar Bhaskarla
Honored Contributor

Re: How to VG status

Hi,

To make it exclusive it should be part of MC/Service Guard and the cluster software must be up and running. If so, you need to do a vgchange -c y and then vgchange -a e to get it to exclusive mode.

Otherwise, you can't.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: How to VG status

Hi:

That only has meaning if this is part of a MC/ServiceGuard cluster.

In that case, vgchange -a e /dev/vgMlbb
will do the trick. Normally, this is done as part of a package script.
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: How to VG status

Hi again,

For making it exclusive, the VG must be marked as part of a HA cluster, and the availability software (MC/SG) must be running on the system. Otherwise it won't be activated.

HTH,
Shiju
Life is a promise, fulfill it!
Patrick Wallek
Honored Contributor

Re: How to VG status

The command to make a VG exclusive is:

vgchange -a e vg??

Have a look at 'man vgchange' for more information. Here's an excerpt from the man page for the '-a e' option:

"Activate each specified volume group and all associated physical and logical volumes for exclusive read-write access. The volume group must be marked as part of a high availability cluster, and the availability software must be
running on the system; otherwise, the volume group is not activated."

To control membership in a cluser you use the '-c' option to vgchange:

-c cluster
Control the membership of volume groups in a
high availability cluster. cluster can have
one of the following values:

y Mark each specified volume group as a member of the high availability cluster. The high availability software must be running otherwise, the volume group is not marked. Needs to be done on one node only.

n Remove each specified volume group from membership in the high availability cluster. The high availability software does not need to be running.

The volume group must be deactivated with the
-a n option before a -c y|n option can be
executed.


Tim D Fulford
Honored Contributor
Solution

Re: How to VG status

Narasimham

You basically want a clustered VG

1 - stop apps (that use vgMlbb)
2 - umount all filesystems that are using vgMlbb & stop any access to the vgMlbb disks
3 - vgchange -a n vgMlbb
4 - vgchange -c y vgMlbb
5 - vgchange -a e vgMlbb
6 - mount up filesystems
7 - start up apps
DONE

The crucial steps are 4 & 5

I have some questions/caveats
o Why do you want to use the volume group as clustered VG? Is it going/will be part of a service guard? if so the below is part of the SG scripts (lvmrc).
o If you do the above you will need to alter /etc/lvmrc to activate the volume group as above (vgchange -a e vgMlbb).
o If this volume group is to be shared between two computers DO NOT DO vgchange -a e vgMlbb on BOTH. Only do this on one. You can destroy data like this.

Tim
-
Narasimham
Advisor

Re: How to VG status

Sri..
vgchange -a n /dev/vgMlbb1
vgchange: Couldn't deactivate volume group "/dev/vgMlbb1":
Device busy

the cluster is up and running running
the output of cmviewcl is as follows:


UNOWNED_PACKAGES
Mlbb1_pkg down halted disabled unowned


with the above ,
I think the device is not busy

Thanks
Narasimham
Sridhar Bhaskarla
Honored Contributor

Re: How to VG status

Hi,

This means, the volume group might be configured into your package. Look at your package script file. You can try to fix it like this. You may need a cluster clean up.

1. Unmount all the file systems of vgMlbb1.
2. vgchange -a n vgM1bb1.
3. vgchange -c y vgM1bb1.
4. Then start up the package. Make sure both the nodes are up and running and are showing up in the cluster. Check the other node to see if the package is running by grepping the processes and looking at the mounts.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Narasimham
Advisor

Re: How to VG status

Hi all

I got the solution for changing the VG status.
Thank you all for helping me

Narasimham