Operating System - HP-UX
1834780 Members
2974 Online
110070 Solutions
New Discussion

FileSystem Removal in a Cluster Node Pair

 
SOLVED
Go to solution
Cliff Lim Kok Hwee
Regular Advisor

FileSystem Removal in a Cluster Node Pair

Gd Day Forum,

I will need to remove a filesytem /mnt/KCCAFPRD2/data04 on /dev/vg02/lvol4 from my cluster package named kcb2bprd.

This are the steps I will be performing:-

1.Stop the package kccafprd
cmhaltpkg -v kcb2bprd
2.Unmark vg02 from cluster and activate vg02
vgchange –c n vg02
vgchange –a y vg02
3. Remove logical volume /dev/vg02/lvol4
lvremove /dev/vg02/lvol4
4. Modify the /etc/cmcluster/kccafprd2/kccafprd2.cntl file in both the primary and secondary node, by removing the entry LV[3]=/dev/vg02/lvol4; FS[3]=/oracle/KCCAFPRD2/data04; FS_MOUNT_OPT[3]="-o rw,suid,largefiles"
5. I presume I need to do a vgexport of vg02 in the primary node and then a vgimport vg02 in the secondary node.
6.Deactivate vg02 and mark to cluster
vgchange –a n vg02
vgchange –c y vg02
7.Start cluster kcb2bprd
cmrunpkg –v kcb2bprd

Queries:

- Can anyone advise me on step 5 on how to perform a vgexport and vgimport?
- Can I check do I need to modify the /etc/fstab file cause I dont see any entry there for filesytem /mnt/KCCAFPRD2/data04.
- Finally did I miss out any steps needed?

Thanks in advance for the render help.

regards/cliff





6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor
Solution

Re: FileSystem Removal in a Cluster Node Pair

Hi Cliff,

You may not need to unmount the filesystem unless it is heavily used by the application. If there are no processes associated with that filesystem, you can remove it while the package is up and running. In case if you have to bring down the package, then I would do 'vgchange -a e vg02' instead of those two vgchange steps.

Regarding point 5, yes you will need to do a vgexport and import of vg02. The easier way is

5a. Generate the map file on the primary node.

Primary Node:

vgexport -p -v -s -m /tmp/vg02.map
Copy /tmp/vg02.map file to the alternate node

Secondary Node:

ll /dev/vg02/group (note the minor number say 0x020000)

vgexport vg02
mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000
vgimport -v -s -m /tmp/vg02.map vg02

When you get a chance, run the package on secondary node and make sure things work. Don't forget to sync the control files. There wont' be any entry for ServiceGuarded filesystems in /etc/fstab.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Cliff Lim Kok Hwee
Regular Advisor

Re: FileSystem Removal in a Cluster Node Pair

Sri,

Thanks for the advise.

Need to verify with u the following:-

- If I can remove the filesystem together with the logical volume while the package is up and running, there is still a need to modify the package control file in both nodes and vgexport and reimport procedure am I right?

- vgchange -a e is applicable even with the package down? By running vgchange -c n and vgchange -a y is it allowed too? If vgchange -a e is applicable for step 6 I will run vgchange -a n vg02 to deactivate it?

- U mentioned sync control files meaning to manually edit the /etc/cmcluster/kccafprd2/kccafprd2.cntl file as in step 4 on both primary and secondary node. Am I correct?

thanks n regards/cliff
Sridhar Bhaskarla
Honored Contributor

Re: FileSystem Removal in a Cluster Node Pair

Hi Cliff,

Yes. You can remove the logical volume if the cluster is running provided stopping the processes on that filesystem will not affect serviceguard functionality (like monitoring those processes through serviceguard etc.,). Be careful while editing the control script. Syntax errors can result the package halt to fail subsequently.

Regarding modifying the control files, you have to modify them in any case. on the same note, I copy the serviceguard files from the other node instead of editing the file on the node itself. That's what I meant by sync'ing up.

You can run vgchange -a e when the package is down. It's better to run vgchange -a n once you are done as 'vgchange -a e' may not necessarily be the activation policy in your package configuration. You can run vgchange -c n steps too but they are nothing but few extra steps.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Cliff Lim Kok Hwee
Regular Advisor

Re: FileSystem Removal in a Cluster Node Pair

Sri,

Copying from the modified control file of primary node over to the secondary node is easier I presume.

- Check with u all I need is to remove the filesystem entry 'LV[3]=/dev/vg02/lvol4; FS[3]=/oracle/KCCAFPRD2/data04; FS_MOUNT_OPT[3]="-o rw,suid,largefiles"'
from the package control file will do? Is there any other package file I might have missed out?

- vgexport -p -v -s -m /tmp/vg02.map in primary node in preview mode -m to generate the map file, does not matter if vg is currently activated. Am I correct?

- vgexport and vgimport in the secondary node should have no concern with the vg activation since it is not activated at all. Am I right?

thanks n regards/cliff
Sridhar Bhaskarla
Honored Contributor

Re: FileSystem Removal in a Cluster Node Pair

Hi Cliff,

// Check with u all I need is to remove the filesystem entry 'LV[3]=/dev/vg02/lvol4; FS[3]=/oracle/KCCAFPRD2/data04; FS_MOUNT_OPT[3]="-o rw,suid,largefiles"'
from the package control file will do? Is there any other package file I might have missed out?//

Yes. That's the only place where you will specify the filesystem.

//- vgexport -p -v -s -m /tmp/vg02.map in primary node in preview mode -m to generate the map file, does not matter if vg is currently activated. Am I correct?//

Correct. It may give out errors like "vg is active" etc., but still will generate the map file.

//- vgexport and vgimport in the secondary node should have no concern with the vg activation since it is not activated at all. Am I right? //

Yes. Only import the VG. Do not activate it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Cliff Lim Kok Hwee
Regular Advisor

Re: FileSystem Removal in a Cluster Node Pair

Thanks for all the advise Sri

cheers/cliff