Operating System - HP-UX
1832592 Members
2473 Online
110043 Solutions
New Discussion

removal of VG from package.

 
SOLVED
Go to solution
kirit_2
Frequent Advisor

removal of VG from package.

Hi,

I want to remove one of the volume group from package of MC service gaurd setup.

This volume group contains two file systems and both need to be removed from package configuration.

Can I do the same without shutting down complete cluster ? As I need to remove entry from cluster ascii file for that perticular VG.



















6 REPLIES 6
G. Vrijhoeven
Honored Contributor
Solution

Re: removal of VG from package.

Hi,

As far as i know, there are two config files in wich vgconfigs in a cluster are kept.
The package control file. In this file the volume group and the lvol mount command lines can be deleted. This can be done with a running cluster, The package needs to be down.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/linux/onlinedocs/B9903-90005/B9903-90005_top.html&con=/linux/onlinedocs/B9903-90005/00/00/37-con.html&toc=/linux/onlinedocs/B9903-90005/00/00/37-toc.html&searchterms=cluster%7conline&queryid=20040419-121710

Go to Reconfiguring a Package on a Running Cluster section for more info.

The second file is the cluster.ascii file. In this file the vg's that are cluster awaire can be listed.If you alter this file by deleting the vg you can do a cmcheckconf -v -C /etc/cmcluster/*.ascii
to see if this can be done online. I am not sure.

HTH,

Gideon
The second place is the cluster ascii file.
Sanjay_6
Honored Contributor

Re: removal of VG from package.

Hi,

You should be able to do this online. Unmount the filesystem. Remove them. Deactivate the VG to which this belongs. Change the VG configuration to remove the cluster awareness for this VG.

vgchange -c n /dev/vg_name.

Edit the Cluster ascii conf file on one of the nodes and remove the name of the VG from the configuration file. Do a cmcheckconf and then do a cmapplyconf. This will apply the changes across all nodes on the cluster.

Don't forget to remove the Filesystems from the package startup script on the node on which this is running and replicate the change across the alternate nodes. You can do this while the package is up and running.

Hope you are not monitoring something within those two filesystems / VG that you are removing that could lead to the package failover.

Hope this helps.

Regds
Sundar_7
Honored Contributor

Re: removal of VG from package.

Sure you can do it without shutting down the cluster.

# umount /fs1
# umount /fs2
# lvremove /dev/vg01/lvol1
# lvremove /dev/vg01/lvol2
# vgchange -c n /dev/vg01
# vgchange -a n /dev/vg01
# vgexport /dev/vg01

Edit the package control file and remove the reference to the volume group and its file systems

Edit the cluster ascii file and remove the volume group from the cluster aware volume groups list.

In the other nodes that have the volume group imported run vgexport and remove the volume group from /etc/lvmtab and also the device files for the vg

Copy the package control file and cluster ascii file to the other nodes in the cluster.

Learn What to do ,How to do and more importantly When to do ?
Stephen Doud
Honored Contributor

Re: removal of VG from package.

One thing to be careful of, when removing the volume group from the package... Insure that if there are any remaining references to logical volumes in the package control script, that they be properly sequenced, beginning with array variable 0.
Example:
LV[0]="/dev/vg01/lvol1"; FS[0]="/sg1"; FS_MOUNT_OPT[0]="-o rw"
LV[1]="/dev/vg01/lvol2"; FS[1]="/sg2"; FS_MOUNT_OPT[1]="-o rw"
LV[2]="/dev/vg01/lvol3"; FS[2]="/dump5"; FS_MOUNT_OPT[2]="-o rw"
LV[3]="/dev/vg01/lvol4"; FS[3]="/depot"; FS_MOUNT_OPT[3]="-o rw"

If you were to remove the second lvol above, the array values of 2 and 3 would have to be changed to 1 and 2 in order for the script to work properly.

-SD-
Scott J. Showalter
Frequent Advisor

Re: removal of VG from package.

FYI as additional information;

Here are a couple of links that point to documentation that shows what can and can't be done with the cluster/package in the running/halted states.

Cluster Configuration(see Table 2):
http://docs.hp.com/hpux/onlinedocs/B3936-90065/00/00/51-con.html

Package Configuration(see Table 3):
http://docs.hp.com/hpux/onlinedocs/B3936-90065/00/00/52-con.html

The whole manual(A.11.14) starts at:
http://docs.hp.com/hpux/onlinedocs/B3936-90065/00/00/1-con.html
This is a great resource.
In a world without fences, who needs Gates?
generic_1
Respected Contributor

Re: removal of VG from package.

I would implement that in dev or test first if you have those setup in like environments just to give you a warm fuzzy about changes too the scripts :) and that the applications are happy with those filesystems being gone. Also would not hurt to do a test failover. It only takes one typo.