Operating System - HP-UX
1753707 Members
5076 Online
108799 Solutions
New Discussion юеВ

Need to remove apackage as well as its Vgs from cluster

 
SOLVED
Go to solution
Sreer
Valued Contributor

Need to remove apackage as well as its Vgs from cluster

Hi Gurus,

I have to perform the following:

1) Delete a package
2)Delete few of the Vgs which were used in this package.

My plan is as below:

1. halt the typical package ==> cmhaltpkg -v pkgname [ from the node where the pkg is running]

2. Delete the package configuration from cluster:

# cmdeleteconf -p package-name

3. Delete the Vgs& related Lvs

Hope while halting the package it self all the Vgs under this package will be in deactivated state.

So can I directly do --> vgexport /dev/vgname [ for all vgs to be removed? ]

4. Do the same vgexports from all cluster nodes

I have a confusion here:

Do I need to copy the /etc/lvmtab file to all cluster nodes? [ I believe no !!!] pls confirm..

5. then rm -r /etc/cmcluster/packagename

this is my rough plan.

Pls correct me if some more steps to be added here to complete my task?

many thanks in advance.

Rgds
Sree

6 REPLIES 6
Terry.giblin
Frequent Advisor

Re: Need to remove apackage as well as its Vgs from cluster

Dear Sreer,

Can I ask a simple question?

Sometimes adding is better than deleting.

How would you add a new vg group, to a running cluster? - Then work backwards, if you get my point.

That's how I solved this problem.

Terry Giblin
wci
Frequent Advisor

Re: Need to remove apackage as well as its Vgs from cluster

Hi Sree,

Your steps looks ok to me except for copying the lvmtab file to other nodes.

1. when you halt the package your vg's normally get unavailable but it might not for many reasons like errors in the package control script and file systems still being mounted. So you can check this by running vgdisplay and if it is still active it would be good to see why it is still active.
once these are fixed you can manualy run a vgchange -a n for these vg's and then export vg's.

when you export the Volume group (vgexport ) it will update /etc/lvmtab file only on the host you are running the command.

The lvmtab file is specific to each and every cluster node and normally you do not copy the lvmtab file to other nodes.
So you have to manualy run vgexport on all nodes to update the lvmtab file to remove the volume group.

Cheers

WCI
Benoy Daniel
Trusted Contributor

Re: Need to remove apackage as well as its Vgs from cluster

All looks good except no need to copy the LVMTAB. LVMTAB will be updated once you do the vgexport. Make sure you do the vgexport of secondary node, so that the VG will be removed from other node too.
Sreer
Valued Contributor

Re: Need to remove apackage as well as its Vgs from cluster

Hi,

Thnx all for your help.

So I hope I can go ahead with the mentioned steps.

I will wait for closing this Thread till my work is completed successfully :-)

Rgds
Sree

Emil Velez
Honored Contributor
Solution

Re: Need to remove apackage as well as its Vgs from cluster


Steps except for the lvmtab looks good

DO NOT COPY THE /etc/lvmtab to the other systems. You can corrupt it especially since vg00 will have a different vgid on the other systems.

after removing the package

goto each of your systems and export the volume group from each system.

Then on the last system you can either export the volume group.

THen to use the disks you will need to do a pvcreate -f

or you can activate the vg

vgchange -c n vgXX
vgchange -a y vgxx
vgremove vgXX

after you remove all of the volume groups and disks.

Sreer
Valued Contributor

Re: Need to remove apackage as well as its Vgs from cluster

Hi Gurus,
thanks much for your help.
The thread is closed.

happy new year to all.

Iam just going through my old querris and closing if needed ONLY after assignig points :-)

thnx again.

Rgds
Sree