1833875 Members
1442 Online
110063 Solutions
New Discussion

Re: Volume Group

 

Volume Group

Hi,
I have a 2 node cluster running MC/SG & HP11i.

I have problems with export/import of VGs.

I created a volume group /dev/sharedvg. It was activated on Node1. Now using LVM commands, I distributed to node2. Now I deactivated on Node1. Now when I try to activate on Node2 , i got the error:
vgchange: Activation mode requested for the volume group "/dev/sharedvg" conflicts with configured mode.

Now, again i come to Node1 and try to activate. I get the same error as above.

Please help.

Thanks & Regards,
Karthik Narayanan

13 REPLIES 13
Sridhar Bhaskarla
Honored Contributor

Re: Volume Group

Hi Karthik,

If it is already part of serviceguard, the preferred mode of activation is 'vgchange -a e' so that you don't change the VG configuration.

Now if you just created the volume group, I don't see any reason why it would give this error.

See if the following helps you,

On the primary node

#vgchange -a n /dev/sharedvg
#vgchange -c n /dev/sharedvg

Then on the secondary noe

#vgchange -a y /dev/sharedvg

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: Volume Group

Hi Karthik,

How are you activating it?

Use

vgchange -a e /dev/vg_name

e in this case means exclusive.
The other thing to be aware of is the cluster bit. If this VG will be used by MC/SG you'll need to do the following

vgchange -c y /dev/vg_name

To make the VG cluster-aware.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Tim D Fulford
Honored Contributor

Re: Volume Group

I've seen this message in two states

1 - SG up and running and I typed
# vgchange -a y sharedvg
This is wrong, it should be
# vgchange -a e sharedvg

2 - SG was down (cluster, node, package.. EVERYTHING). I typed
# vgchange -a y sharedvg
As SG is disabled, cmcld is not running hence, I should have typed
# vgchange -a y sharedvg

You probably needed to do 1) but 2) is useful to know if you are in trouble & want to start the cluster services "manually" WITHOUT ServiceGuard.

Tim
-
Tim D Fulford
Honored Contributor

Re: Volume Group

OOOPS 2 should read
# vgchange -a e sharedvg
wrong...
# vgchange -a y sharedvg

sorry for the confusion
-

Re: Volume Group

I do not have SG running. Everything is down.
Tim D Fulford
Honored Contributor

Re: Volume Group

I want a re-call answer option!!!.... Here is what I meant to write

I've seen this message in two states

1 - SG up and running and I typed
# vgchange -a y sharedvg
This is wrong, it should be
# vgchange -a e sharedvg

2 - SG was DOWN (cluster, node & package.. EVERYTHING). I typed
# vgchange -a e sharedvg
As SG is disabled, cmcld is not able to communicate with other nodes in cluster hence, I should have typed
# vgchange -a y sharedvg

You probably needed to do 1) but 2) is useful to know if you are in trouble & want to start the cluster services "manually" WITHOUT ServiceGuard.

Tim
-

Re: Volume Group

Now, I blew off everything on the disk.
vgexport /dev/sharedvg

Cluster is DOWN.
Now on node1, I create physical vol
pvcreate -f /dev/rdsk/c4t9d0

Now on node1, I create VG, LV, Filesystems using SAM.
All is fine, everything is mounted.
Now i deactivate on node1, by
vgchange -a n /dev/sharedvgNEW

Gets deactivated.
Now, I try to activate again on node1 by
vgchange -a y /dev/sharedvgNEW.
I get error message as put on the previous post by me.
Tim D Fulford
Honored Contributor

Re: Volume Group

If SG is down (EVERYTHING)

vgchange -a y sharedvg

REMEMBER, you will be doing this outside of SG, so if you fix the problem you will need to stop package processes, unmount filesystems & de-activate sharedvg (possibly remove shared memory segments if left lying 'round !!!)

Tim
-
Tim D Fulford
Honored Contributor

Re: Volume Group

If SG is down (EVERYTHING)

vgchange -a y sharedvg

REMEMBER, you will be doing this outside of SG, so if you fix the problem you will need to stop package processes, unmount filesystems & de-activate sharedvg (possibly remove shared memory segments if left lying 'round !!!) Before starting SG again.

Tim
-
Uday_S_Ankolekar
Honored Contributor

Re: Volume Group

Try

vgchange -c n /dev/sharedvg to deactivate

vgchange -c y /dev/sharedvg to activate the VG.

Do not use -a option.

-USA..
Good Luck..
Sridhar Bhaskarla
Honored Contributor

Re: Volume Group

SAM!!! The answer is right there.

Try creating it manually and see.

1. mkdir /dev/sharedvg
2. mknod /dev/sharedvg/group c 64 0x050000
3. vgcreate /dev/sharedvg /dev/dsk/c4t9d0
4. vgchange -a n sharedvg (deactivate)
5. vgchange -a y sharedvg (activate)

Export/import it on the secondary node and do the same excersize.

I do not use SAM almost for everything.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Tim D Fulford
Honored Contributor

Re: Volume Group

Appologies for the multiple replies...

Unless I've misunderstood you, I think you've just deleted all your data!!!

sharedvg should be available to BOTH node1 & node2 simultanously (though only one will be able to use it at any one point).

If you have sharedvg on node1 correctly & you want get node2 to see it

on node1
# vgexport -m /tmp/sharedvg.map -s -p -v sharedvg
# rcp /tmp/sharedvg.map node2:/tmp

on node2
# mkdir /dev/sharedvg
# mknod /dev/sharedvg/group c 64 0x??0000
# vgimport -m /tmp/sharedvg.map -s -v sharedvg

Check node2 is fine
# vgchange -a r sharedvg (read-only)
# vgdisplay -v sharedvg
# vgdisplay -a n sharedvg

NOTE NO pvcreate, this splats the header of your disk effectiely deleting ALL the data on it!!!

Quick 101 on LVM...
LVM writes itself into the VGRA & VGDB on the disks, the DISKS KNOW what volume group it belongs to & what logical volumes (nameless) it has, what size each LV & how many disks in VG. The LV names & VG names are translated from numbers on disk into names via HP-UX/LVM/Kernel (e.g. 64 0x000001 is /dev/vg00/lvol1, and can be viewed by ls -l /dev/vg00!!).

pvcreate deletes this data held on the disk and hence the data is now unavailable.

Tim
-

Re: Volume Group

Hi Friends,
Thanks for your help. Everything seems to work now..
I really dont have anything on the VG. Thats why I did pvcreate.

Thanks,
NK