Operating System - HP-UX
1753479 Members
4898 Online
108794 Solutions
New Discussion юеВ

Re: Activating VG in another cluster node

 
Sundar_7
Honored Contributor

Activating VG in another cluster node

Thought I knew LVM well :-)

I am having this strange problem while trying to active the replicated VG on an another cluster.

1) Did a pairsplit and pairdisplay to make sure the CA pairs are in split mode

2) VGimported the VG using the CA-SVOLS

3) # vgchange -c n vgXX
Performed Configuration change.
Volume group "vgXX" has been successfully changed.

This will remove the cluster ID of the old cluster

4) # vgchange -c y vgXX
Performed Configuration change.
Volume group "vgXX" has been successfully changed.
#

This will install the cluster ID of the new cluster (or that is what I thought :-))

5)# vgchange -a e vgXX
vgchange: Volume group "/dev/vgXX" belongs to a different Cluster. Activation failed.

I am also looking in to the possiblity of a LVM patch fix. But any thoughts ?

Sundar.
Learn What to do ,How to do and more importantly When to do ?
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: Activating VG in another cluster node

When doing this, I always run vgchgid and I don't see that step.
If it ain't broke, I can fix that.
Sundar_7
Honored Contributor

Re: Activating VG in another cluster node

Per my understanding, you dont need vgchgid if the system doesn't see both the PVOL and the SVOLs.

The system is zoned to see only SVOLS and thus wont get "confused" seeing two disks with the same PVID/VGID.

I know it doesn't hurt to try but the above sequence of commands should work.
Learn What to do ,How to do and more importantly When to do ?
A. Clay Stephenson
Acclaimed Contributor

Re: Activating VG in another cluster node

The man page for vgchanges also indicates that you must run vgchange -a n before doing a -c y or -c n and obviously you didn't do that (nor could you). I think the vgchgid will actually take care of two problems at once.
If it ain't broke, I can fix that.
Hoang Chi Cong_1
Honored Contributor

Re: Activating VG in another cluster node

Hi

Suppose that you want to activate vg01 from nodeA to nodeB in your cluster (In normal case, this do by using MC/SG command).
I have done this job lots of time :)

1) nodeA#umount all of mount point belong to vg01
2) nodeA#vgchange -a n vg01
3) nodeA#vgchange -c n vg01
4) nodeB#vgchange -c y vg01
5) nodeB#vgchange -a y vg01

Hope this works :)
Looking for a special chance.......
Aashique
Honored Contributor

Re: Activating VG in another cluster node

Hi,
You can do this:

1. fuser -ku /dev/vgash/lvol1
2. umount /test
3. vgchange -a n vgash
4. vgchange -c n vgash
5. vgchange -a n vgash
6. vgchange -a y vgash
7. fsck -F vxfs /dev/vgash/lvol1
8. mount /dev/vgash/lvol1 /test

Thanks & Regards

A. Aashique
Sundar_7
Honored Contributor

Re: Activating VG in another cluster node

It turns out pairsplit does a read-only split of the SVOLS by default.

So, the vgchange commands, though seem to complete successfully, is misleading.

After splitting the pairs with -rw option, I was able to change the cluster ID and activate the VG in exclusive mode !

HP LVM team ?!?!?!!!
Learn What to do ,How to do and more importantly When to do ?
skt_skt
Honored Contributor

Re: Activating VG in another cluster node

CA split is RO only by default(but the BC split is RW by default).

I used to mount the CA copy for backup; But never faced this problem as i always bring them up in normal(-a y) for backup.
Sundar_7
Honored Contributor

Re: Activating VG in another cluster node

Santhosh,

You will not be able to do a vgchange -a y if the source VG was part of a cluster.

In my opinion, vgchange -c y and -c n are very misleading. Had they complained that the configuration change cannot be performed due to read-only volumes, I would have figured instantly that the S-VOL was split read-only.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
skt_skt
Honored Contributor

Re: Activating VG in another cluster node

what i remember is , we split in RW mode and and then vgchange -a y(whihc means "-c n" priorly)