1834346 Members
2141 Online
110066 Solutions
New Discussion

add a new vg in cluster

 
ani007
Super Advisor

add a new vg in cluster

Hi ALL,
To add a new vg vgtest to SG cluster(2 node) I would do following:
Please let me know am i correct?

(SG is up)
on node A:
vgchange -a n /dev/vgtest
vgchange -c y /dev/vgtest
vgchange -a e /dev/vgtest

vi /etc/cmcluster/cmclconf.ascii
(add VOLUME_GROUP /dev/vgtest).

vi /etc/cmcluster/packageA/packageA.cntl
What i need to add in packageA.cntl file?

rcp cmclconf.ascii to nodeB
rcp packageA.cntl to nodeB

cd /etc/cmcluster/packageA
vgexport -v -p -s -m vgtest.map /dev/vgtest

rcp vgtest.map nodeB:/etc/cmcluster/packageA

go to node B.
on node B:

mkdir /dev/vgtest
mknod /dev/vgtest/group c 64 0xXX0000
(XX next available or especially assigned minor number)
cd /etc/cmcluster/packageA
vgimport -v -s -m vgtest.map /dev/vgtest

Regards,
Ani
9 REPLIES 9
rariasn
Honored Contributor

Re: add a new vg in cluster

Hi Ani:

vi /etc/cmcluster/packageA/packageA.cntl
What i need to add in packageA.cntl file?

Specify new volume groups.

VG[n]=/dev/vgtest

rgs,
ani007
Super Advisor

Re: add a new vg in cluster

Any other things which i need to add/modify?
rariasn
Honored Contributor

Re: add a new vg in cluster

Hi ani:

Probe VG configuration:

Node A:

# vgdisplay -v vgtest
# vgchange -a n vgtest

Node B:

# vgchange -a e vgtest
# vgdisplay -v vgtest
# vgchange -a n vgtest

Node A:

# vgchange -a e vgest

If all OK:

# cd /etc/cmcluster
# cgmgetconf -v -c cluster_name cmclconf.ascii

# cmgetconf -v -c cluster_name -p packageA

man cmgetconf

rgs,


Stephen Doud
Honored Contributor

Re: add a new vg in cluster

One normally does not create a volume group unless they also create logical volumes in which to place data. Normally, such logical volumes are loaded with a file system, which must be mounted to a directory in another file system.

A VG can only be used by a single package unless you are using Serviceguard extension for RAC (which is more rare than common Serviceguard).

If you add a VG reference to a package (configuration file (modular format) or control script (legacy format), you will likely need to add references to the logical volumes that you create in the new VG, for use in the package unless the package is used for Oracle RAC, which uses raw volumes.

Example addition to legacy package control script:
LV[3]="/dev/vg07/lvol4"; FS[3]="/mnt4"; FS_MOUNT_OPT[3]="-o rw"

Example addition to modular package configuration file:
fs_name /dev/vg07/lvol1
fs_directory /mnt4
fs_mount_opt "-o rw"
fs_umount_opt "-s"
fs_fsck_opt "-s"
fs_type "vxfs"

If you are dealing with legacy packages, copy such file modifications to the same file on the other nodes.
If you are dealing with modular packages, cmapplyconf the change made to the package configuration file.
Shibin_2
Honored Contributor

Re: add a new vg in cluster

>> mknod /dev/vgtest/group c 64 0xXX0000
(XX next available or especially assigned minor number)

minor number should be exactly same as the one you given in Node A.
Regards
Shibin
ani007
Super Advisor

Re: add a new vg in cluster

Hi rariasn;
After completing those steps (which i mentioned above in my post) shall I follow your steps which you mentioned in your second reply?

Regards,
Ani
rariasn
Honored Contributor

Re: add a new vg in cluster

Hi ani:

>>> vi /etc/cmcluster/cmclconf.ascii
(add VOLUME_GROUP /dev/vgtest).

no vi.

# cd /etc/cmcluster
# cmgetconf -v -c cluster_name cluster_name.ascii


cmgetconf - Get cluster or package configuration information

man cmclconfig

# vgchange -a e vgtest

Next vgexport and vgimport probe to activate vgtest in both nodes.

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


man vgchange



rgs,
Raj Briden
Frequent Advisor

Re: add a new vg in cluster

Your step is correct to add the VG in a cluster.

You need to add the LV information in pkg control file, something like below

LV[x]=""; FS[x]=""; FS_MOUNT_OPT[x]=""

after that you can use the steps in 2nd point of Rari
ani007
Super Advisor

Re: add a new vg in cluster

tnx all