Operating System - HP-UX
1834449 Members
2441 Online
110067 Solutions
New Discussion

Re: To remove LV from a running cluster

 
mparasur
Advisor

To remove LV from a running cluster

Hi,

I wish to remove a Logical Volume from a running cluster. It is part of a package. Could anyone please help me how to accomplish the task. Do I need to halt the package before removing the LV.

Thanks in Advance
Mani
6 REPLIES 6
smatador
Honored Contributor

Re: To remove LV from a running cluster

Hi,
Yes you do
An lvremove affects the package control
scripts and /dev/vgNAME directories on both nodes.

1) Insure the logical volume is no longer in service. If necessary, unmount the file system if the logical volume is mounted on the node where it's package is operating.
2) Edit the package control script on the node running the package. Remove the reference line for that logical volume and resequence subsequent lines as needed.
3) Copy the changes made in the package control script to the other nodes that will operate the package.
4) Stop and start the package to assure the script operates as desired.
sujit kumar singh
Honored Contributor

Re: To remove LV from a running cluster

hi mani,

1) get the package down, keep a copy of the pkg.cntl file on both the nodes.

2)activate the VG on one of the nodes in the exclusive mode(vgchange -a e vgXX) , remove the LV (lvremove /dev/vgXX/lvolZ) from that VG , genrate a map file fot that VG that after removung the LV using
#vgexport -p -v -s -m /tmp/vgXX.map /dev/vgXX
#rcp /tmp/vgXX :/tmp/


deactivate the VG on the node1;
#vgchange -a n vgXX

make necessary changes to the pkg.cntl file to remove that LV moint option from the control file.

rcp this package control file on the other also.

on the other node import this VG.

#vgexport /dev/vgXX
#mkdir /dev/vgXX
#mknod /dev/vgXX/group c 64 0xYY0000
make sure the the minor 0xYY0000 is unique on the node and the same as on the node node1.
#vgimport -v -s -m /tmp/vgXX.map /dev/vgXX



try now also by doing certain tests:

1) after this change make sure that the package is run on the both the onodes and that is successful so that you are sure atht in case of the pkg failover you shall be able to run the pkg obn the otehr niode also .

regards
sujit




D Anderton
Advisor

Re: To remove LV from a running cluster

Unless your monitor script checks for filesystems / logical volumes you can add and delete lv's online.

Just ensure you remember to replicate the changes on both hosts (vgexport / import) + change the package script so the LV is no longer referenced - mounted.

Sani
Frequent Advisor

Re: To remove LV from a running cluster

Yes , i agree with Damian ,

If you dont have any monitoring service for file system, you can delete the lv with out halting package.

Regards
Sani
Doug O'Leary
Honored Contributor

Re: To remove LV from a running cluster

Hey;

Just to add my $.02, the last two posters are correct. As long as there's no monitoring of the logical volume, you can delete it online.

You can always add lvs online; however, unless the monitoring scripts are very well written, it probably won't be monitored. If you do add, lvs, make sure you export/import on the adoptive nodes.

Make sure you update the package control files/scripts as required and it's always a good idea to get a package outage sometime int he near future to test/verify the updated scripts.

Hope that helps.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
mparasur
Advisor

Re: To remove LV from a running cluster

Thank you all for your reply.

Let me do the removal of LV as suggested and give you the feedback