Operating System - HP-UX
1753518 Members
5029 Online
108795 Solutions
New Discussion юеВ

Re: Removing a VG from a Running Package

 
SOLVED
Go to solution
Thomas Rectenwald
Occasional Advisor

Removing a VG from a Running Package

I have a package consisting of several VGs. One of these VGs is no longer in use and I'd like to remove it completely to free up the disk space it is using.

All LV's within the VG are free, no PIDs running on any of them. Can I do something like this while the package is still online?:

# vgchange -a n vg-NAME
# vgchange -c n vg-NAME
# vgexport vg-NAME
# -- Edit RC file and remove VG --

Note, there are no filesystems in the VG and no active processes running against it. I'm just worried that deactivating a VG that is part of a running package may cause the package to failover.

Thanks!
8 REPLIES 8
Geoff Wild
Honored Contributor
Solution

Re: Removing a VG from a Running Package

No, you can't, according to table 7-2:

http://docs.hp.com/en/B3936-90079/ch07s05.html

Remove a volume group -
Package must not be running.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: Removing a VG from a Running Package

Shalom Thomas,

You have to stop a package to reconfigure its resources. No way around that. It makes sense. So long as the package is running how can it release the vg?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Thomas Rectenwald
Occasional Advisor

Re: Removing a VG from a Running Package

Thanks guys. One more quick question related to this. I'll have to eventually halt the package to get rid of the VG, and thus have that disk available for reuse. However, is it okay to do a number of 'vgreduce' commands against it to free up the PVs while the package is online? Not sure this would effect anything and would help free up some disk while still leaving the VG active.
Geoff Wild
Honored Contributor

Re: Removing a VG from a Running Package

I have never done that while the cluster was running - so I can't tell for sure....

Do you have a test environment?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Thomas Rectenwald
Occasional Advisor

Re: Removing a VG from a Running Package

No, unfortunately I don't have a test environment. I know, that's a bad thing! Unfortunately I'm not left with much of a choice. I'll check around, as long as it does not deactive the VG, I would think that doing a vgreduce and then importing the new configuration on to the failover node should be okay while a package is running.
Nguyen Anh Tien
Honored Contributor

Re: Removing a VG from a Running Package

Hi Thomas!
1, Backup your data before doing
2, I had done it many time! I am sure it will be ok.
3, copy cluster binary file as a copy
#cp /etc/cmcluster/cmclconfig /etc/cmcluster/cmclconfig.bak
4, halt package
#cmhaltpkg pkg1
5, get pakage conf file
#cmgetconf -p pkg1 pkg1.ascii
6,Edit the ASCII package configuration file
#vi pkg1.ascii
7, verify it by
# cmcheckconf -v -P pkg1.ascii
8, apply new conf
# cmapplyconf -v -P pkg1.ascii
Remember to copy the control script to the /etc/cmcluster/pkg1 directory on all nodes that can run the package.
HTH
tienna
HP is simple
Hoang Chi Cong_1
Honored Contributor

Re: Removing a VG from a Running Package

Hi

You can not remove a VG from a running package!
Actually what do you want when remove a VG from a package without halt the package?
Don't have to stop the application, do you?
So, as your think with doing vgreduce and them import the new configruration to the other node in the cluster without halt the package. You still have to shutdown or stop all application first.

Halt the package and remove the VG is the best recommendation, I think so :)

Hope this helps
Hoang Chi Cong
Looking for a special chance.......
Thomas Rectenwald
Occasional Advisor

Re: Removing a VG from a Running Package

Yes, it sounds strange. The VG that is a part of the package is absolutely free from the application (Oracle). There are no processes running on it at all, No LVs in use as a FS or raw device. I was just wanting to reclaim the space without the accompanying outage.

Looks like I'll schedule an outage for this though! :) I do wish I had a test cluster around! Anyway, thanks all for the help with this, I really do appreciate all of the excellent advice.

Tom