Serviceguard
cancel
Showing results for 
Search instead for 
Did you mean: 

Deavtivating the VG while cluster is formed

SOLVED
Go to solution
Muhammad Shamroze
Frequent Advisor

Deavtivating the VG while cluster is formed

Hello ALL, Well as i told u in my previous forum message that the cluster was running fine and package is also running fine...today i halt the package and also halt the cluster..and installed application server on different node...As only database server is on cluster b/w two node and application is on different node with no cluster but integerate with the cluster node..as havent change the cluster and package configuration they were the same but when application server installed the oracle application...i again start the cluster services from live server node it successfully formed the cluster but umount the Volume Group and also deactivate the VolumeGroup that is /oradb where oracle database is i mean the where the Package reside..why this is happening..as i only installed the application server on different node which is integerating with the database cluster node..and havent also change any package and cluster configuration file..when i run the command cmruncl -v it umount the VG and also deactivate it from Current Cluster node but i can see this VG on the Failover node..why this is happening?

after this problem what i did that after running the cluster i again activated the VG by "vgvhange -a y" and mount the VG on current cluster node and run the command cmmodpkg -e Pkg-name and it formed the package and database is running fine and also application which i installed...please help me out in this so ill be thankful
4 REPLIES
Steven E. Protter
Exalted Contributor

Re: Deavtivating the VG while cluster is formed

Shalom,

To initial setup of the shared volume group on the second node, it needs to be exported from the current node in preview mode to get the configuration map.

Afte that you import the vg into the second node using the map file and then you need to test if you can activate it.

This activation step pretty much requires a shutdown of cluster services on the primary node so the VG is not active there and therefore locked.

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
Matti_Kurkela
Honored Contributor
Solution

Re: Deavtivating the VG while cluster is formed

Looks like SEP is thinking about ServiceGuard on HP-UX. His answer is not applicable in this case, because Linux LVM does not create nor use map files for volume groups.

Have you checked the logs? ServiceGuard will write some things to syslog (/var/log/* files) and it will also create a package logfile to the same directory where the package control script is (the name is
When starting a package, ServiceGuard assumes that the package's disks are unmounted and the package's volume group is not activated. If they are already active, ServiceGuard may get errors when trying to activate and mount them again... especially if it then tries to start up processes that are already running.

ServiceGuard will interpret these errors as a failure in package startup, so it will run all the actions for package shutdown (i.e. shut down the package processes, unmount the disks and deactivate the volume group) and restart the package on another node.

ServiceGuard also remembers that the package startup failed on the first node, so you may need to enter "cmmodpkg -n -e " before you're allowed to try running the package on that node again. (The command "cmmodpkg -e " without the "-n" option and the node name has a different meaning.)

This is why you should make sure that nothing in the normal system startup will activate the cluster volume groups before ServiceGuard is started. Only ServiceGuard knows whether the disks are safe to mount or not (i.e. whether another cluster node is currently using them or not); blindly activating the cluster volume groups and mounting the disks as part of normal system startup is inviting a disaster to occur.

If you need to activate the volume group and mount the disks manually for some maintenance operation when the ServiceGuard cluster is down, that's within your rights as a system administrator: but you must unmount the cluster disks and deactivate the cluster volume groups before starting up ServiceGuard again.

On RedHat ES4 and AS4, you must make a small change to the system startup scripts when you install ServiceGuard. The details for this are in ServiceGuard release notes: ensure that you have done this.

You should also remove any mention of the cluster disks from /etc/fstab on all cluster nodes, or at the very least add "noauto" to their mount options.

On HP-UX, the kernel and the LVM tools are aware of ServiceGuard clustering and have interlocks to prevent uncontrolled activation of the ServiceGuard-controlled volume groups. On Linux, such a mechanism does not exist (yet), so you must be extra careful.
MK
Serviceguard for Linux
Honored Contributor

Re: Deavtivating the VG while cluster is formed

Matti's answer is excellent! I just want to emphasize some points.

1. NEVER NEVER NEVER activate a volume group that is part of a package while the cluster is up. This could lead to data corruption.

2. If you have an application that is part of a package NEVER run that application manually while the cluster is up.

3. If you have activated any Volume groups or started any applicaitons when the cluster was down and you want to bring up the cluster, stop the application and deactivate the volume group before starting the cluster. The easiest thing to do is to reboot the servers so you are in a "clean" state.
Muhammad Shamroze
Frequent Advisor

Re: Deavtivating the VG while cluster is formed

thanks all for helping me out