1832993 Members
3753 Online
110048 Solutions
New Discussion

MC ServiceGuard

 
SOLVED
Go to solution
Leoanrdo Bowens
Advisor

MC ServiceGuard

I have a 2 node cluster that I will be creating a new volume group and logical voulmes. What is the best way to add the new vg and lvols to the HA cluster? I do have a maintenance window to stop the cluster to do the work.
Excuses are tools of the incompetent.
5 REPLIES 5
Christian Gebhardt
Honored Contributor

Re: MC ServiceGuard

Hi
- create VG and lvol's on one node
- vgexport -v -s -p -m vg.mapfile vg
- copy mapfile to second node
- vgimport -v -s -m vg.mapfile vg
- stop packages
- update clusterscripts on both nodes (cmclconf.ascii, package-control-script)
- cmcheckconf ..., cmapplyconf...
- start packages
- stop packages and start on the other node

Chris
John Palmer
Honored Contributor

Re: MC ServiceGuard

1. Create your VG and LV's on one node. vgchange -c y
vgchange -a n
vgchange -a e Create and mount your filesystems.

2. vgexport the VG and import onto the other node.

3. Amend your package config file to include the VG as a VOLUME GROUP.

4. Amend your package control script(s) to include the new VG and LV's.

5. cmcheckconf then cmapplyconf.

According to the documentation, this can be done with the cluster and package running.

Regards,
John
Gerrit Beyken
Respected Contributor
Solution

Re: MC ServiceGuard

Hi,

create the new VG and the Lvols on the first node:
- check which minor-number is the next available by "ll -d /dev/vg*/gr*"
the output is like this:
# ll -d /dev/vg*/gr*
crw-r----- 1 root sys 64 0x000000 May 29 2000 /dev/vg00/group
crw-r--r-- 1 root sys 64 0x010000 Mar 17 2001 /dev/vg01/group
crw-r--r-- 1 root sys 64 0x020000 Apr 3 2001 /dev/vgomni/group
crw-r--r-- 1 root sys 64 0x060000 Jan 23 2001 /dev/vgswap/group
- the create charakterdevicefile for your VG:
1. mkdir /dev/
2. mknod /dev//group c 64 0x(in this case 0x030000)
- pvcreate your disks for the new VG
- vgcreate your new VG
- create your lvols and the mountpoints
- change the VG to be a cluster-VG that can be activated in exclusiv mode by "vgchange -c y
- deactivate your VG "vgchange -a n
- produce a mapfile with VG-ID of you VG by "vgexport -p -s -m
- copy the mapfile to your sec. Node, create the charakterdevicefile and import you new VG by "vgimport -s -m /dev/"
- create your mountpoints, activate your VG "vgchange -a e " and mount your Lvols for checking reasons
- if all works well do a "vgcfgbackup ", umount your Lvols and deactivate your
Now you can imlement your new VG in your MC/SG.
The way you implement your VG depents on what you want to do.
If you want to modify an existing MC/SG Package you have to edit the package-control-script which you can find in /etc/cmcluster///.
In this scrpit you have to add the VG and the Lvols (easy to find). Afterwards copy this script to the secondary node.
To check the modification just do a cmhaltpkg / cmrunpkg on both nodes and check if all Lvols are there.

Best regards

Gerrit Beyken

Ashwani Kashyap
Honored Contributor

Re: MC ServiceGuard

On one node , create the group file for your new VG .

Pvcreate your disks that go in this VG then do a vgcreate/vgextend on these disks .

Create your lvols and mount points . Create your filsystems and mount them .

Edit your cluster config ascii file and enter the new vg there .

Make your vg cluster aware by doing vgchange -c y /dev/vgname .

Unmount your new file sytems and deactivate the volume group .

Exort the VG in a map file . vgexport -p -s -m /dev/vgname .

Now if you want to add a the VG in a new package then create a new package template file and control script and modify the entries as you would normally do for any other package . then do a cmcheckconf and cmapplyconf and then simply start the package using cmrunpkg . Before that sync all your config files on both the nodes .

If you want to add the VG in an existing package then all you have to do is modify the package conf files and control script files accordingly and then do a cmcheckconf and cmaaplyconf .
THen activacte the vg . vgchange -a e /dev/vgname . mount all filsystems and you are good to go . Again sync all config files on both the nodes .



Copy the map file on the other node . Create the same group file as you did on the first node . Then vgimport the VG . vgimport -s -m /dev/vgname .
vgchange -a e /dev/vgname .
THe mount your logical volumes to check they mount fine . THen deactivate the VG again .

Now if you want to
Leoanrdo Bowens
Advisor

Re: MC ServiceGuard

Thanks for all the advice.
Excuses are tools of the incompetent.