Operating System - HP-UX
1834150 Members
3469 Online
110064 Solutions
New Discussion

Re: Changing VGs from a cluster

 
SOLVED
Go to solution
Filipe_1
Frequent Advisor

Changing VGs from a cluster

Hi folks,

We have been handling several boxes with HP-UX for a quite long time, but we are not that experts on MCSG, so forgive this somewhat basic question.

The scenario: two VGs, one package and a migration to a different storage.

How things are now: the package are using two VGs: one "in" the cluster and other "outside" (the new disks from the new storage). The other configured VG are not being used (the data was migrated), and it belongs to the old storage.

Yes, the cluster is inconsistent right now.

What should be done:

- Insert the new disks (a brand new VG) on the cluster.
- Migrtate the data on the old disks to a new disks (other new VG) and insert it on the cluster.
- Discard the older VGs.

Well, making things simplier: how can we insert a VG onto the cluster, and how can I withdraw a VG from the cluster (this implies data migration)? Of course the package must be stopped, but what should I take on account when planning this change? And what if one of the old VGs has the lock disk?

Thanks in advance.

Filipe.







3 REPLIES 3
Devender Khatana
Honored Contributor
Solution

Re: Changing VGs from a cluster

Hi,

Here is the thread which includes recreating VG with different configuration.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=766000

& Here is the one which involves steps for changing the cluster lock.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=260487

The version of service guard discussed here could be different.


HTH,
Devender
Impossible itself mentions "I m possible"
Stephen Doud
Honored Contributor

Re: Changing VGs from a cluster

First, create the new VG and logical volumes in it, then vgimport it onto the second Serviceguard node.

# pvcreate -f /dev/rdsk/c-t-d- (repeat as needed)

Perform the next two commands on both nodes
# mkdir /dev/vg_NEW
# mknod /dev/vg_NEW/group c 64 0xNN0000 (where NN=unique minor number

On the first node only:
# vgcreate /dev/vg_NEW
# lvcreate /dev/vg_NEW/lvolN
(repeat as necessary)
# vgexport -pvs -m /etc/lvmconf/vg_NEW.map /dev/vg_NEW
# rcp /etc/lvmconf/vg_NEW.map OTHERNODE:/etc/lvmconf/

On the other node:
# vgimport -vs -m /etc/lvmconf/vg_NEW.map /dev/vg_NEW (this populates /etc/lvmtab on the 2nd node)

On the first node:
Edit the cluster configuration ASCII file:
- update the FIRST_CLUSTER_LOCK_VG with vg_NEW
In the ASCII file, each node section, update FIRST_CLUSTER_LOCK_PV with one of the disks in the VG

Add VOLUME_GROUP vg_NEW
Remove the old VG VOLUME_GROUP reference

Mount the new VG/lvols
Halt the package which is reliant on the OLD VG
Activate the old VG: vgchange -c y vg_OLD
Mount the related file systems.
Migrate the data from the old VG to the new VG logical volumes. (Use CPIO?)
Edit the package control script, updating these references:
VG[N]
LV[N].....

Copy the package control script to the other node

Leave vg_NEW activated
cmapplyconf -f -C (this will update the cluster lock VG, mark the vg_NEW as a clustered VG, and de-cluster the old VG.
Deactivate vg_NEW.
Start the package - see the package control log file for the cause if the start fails.
Filipe_1
Frequent Advisor

Re: Changing VGs from a cluster

Thanks folks, speccialy Stephen.