- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shutdown cluster package with shutdown command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2010 10:39 PM
11-18-2010 10:39 PM
Is there any option to shutdown the package running with the shutdown -hy 0 command . In our environment we have many maintaince activity . I heard that if we copy some files to the /etc/cmcluster/rc directory then when we shutdown the server with shutdown 0hy 0 command it will first shutdown hte package and then shutdown the server.
Can sone one pls give a brief idea about this ,How its working and which are the files need to copy and from where
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2010 10:53 PM
11-18-2010 10:53 PM
Re: Shutdown cluster package with shutdown command
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2010 11:19 PM
11-18-2010 11:19 PM
Re: Shutdown cluster package with shutdown command
When you issue a shutdown command, the /sbin/rc?.d/K* scripts are executed in order to gracefully stop running processes.
I believe you could make a script in order to stop the package.
The script can be either as simple as calling cmhaltpkg or you should move the package from the current node to another one (cmhaltpkg then cmrunpkg -n other_node).
Best regards
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2010 03:33 AM
11-19-2010 03:33 AM
Re: Shutdown cluster package with shutdown command
Look /sbin/init.d/cmcluster scripts.
##########################
function halt_cluster_node
##########################
# Halt Serviceguard components
{
findproc cmcld
if [ "$pid" = "" ]
then
# No cmcld is running. Return N/A
exit 2
fi
if [ -x $cmhaltnode ]
then
#
# Perform application specific halt actions
#
if [ -d /etc/cmcluster/rc ]
then
for APP_RC in $(ls /etc/cmcluster/rc/K*)
do
$APP_RC
if [ $? -ne 0 ]
then
echo "ERROR: Unable to stop cluster application from $APP_RC"
exit 1
fi
done
fi
$cmhaltnode -vf
if [ $? -ne 0 ]
then
echo "ERROR: Unable to halt cluster on this node."
exit 1
fi
fi
if [ -x /usr/sbin/vxdisk ]
then
deport_vxvm_dgs
fi
}
rgs,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2010 03:53 AM
11-19-2010 03:53 AM
Re: Shutdown cluster package with shutdown command
I should have another approach to stop a package.
As already mentioned shutdown command already shuts all services on the system gracefully, included SG and its packages but instead of such approach I'd stop it manually (cmhaltpkg
HTH.
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2010 05:55 AM
11-19-2010 05:55 AM
Solution"NOTE: The /sbin/init.d/cmcluster file may call files that Serviceguard stores
in /etc/cmcluster/rc. This directory is for Serviceguard use only! Do not move,
delete, modify, or add files in this directory."
Though a shutdown command will cause /sbin/rc2.d/K002cmcluster -> /sbin/init.d/cmcluster to perform cmhaltnode, cmhaltnode cannot terminate cmlvmd correctly if a package shutdown does not completely umount all file systems controlled by the package. This situation leaves cmcld running, so when shutdown executes killall, cmcld is terminated ungracefully, potentially exposing the system to a TOC (tranfer-of-control) - a memory dump, before rebooting.
Page 343 states:
"NOTE: HP recommends that you remove a node from participation in the cluster (by running cmhaltnode as shown below, or Halt Node in Serviceguard Manager) before running the HP-UX shutdown command, especially in cases in which a packaged application might have trouble during shutdown and not halt cleanly."
Fabio's recommendation to perform cmhaltpkg on each package running on the node before performing a shutdown is standard procedure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2010 08:19 PM
11-19-2010 08:19 PM
Re: Shutdown cluster package with shutdown command
thanks for your valuable information .
I have a small query also .I could not find any directory "rc" under /etc/cmcluster/ ..
In this case what we have to do .. in this case also the /sbin/init.d/K002cmclustet will gracefully shutdown the package ..?
Or do I need to modify anythin gmore for a graceful shutdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2010 09:05 PM
11-19-2010 09:05 PM
Re: Shutdown cluster package with shutdown command
Regards,
Sooraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2010 04:07 AM
11-22-2010 04:07 AM
Re: Shutdown cluster package with shutdown command
Do run one of the following:
To force packages that are running on the node to failover:
# cmhaltnode -f
To halt packages running on the node (but not force them to move to an adoptive node):
# cmhaltpkg [-v] [-n node_name]... package_name...
Then 'shutdown' the system and "/sbin/init.d/K002cmcluster" will perform cmhaltnode and shutdown cluster daemons on the node if you only ran the cmhaltpkg command above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2010 09:04 AM
11-27-2010 09:04 AM
Re: Shutdown cluster package with shutdown command
Do assign points for those who have helped. I learned a lot from this thread!!!
Regards
Ismail Azad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2010 09:24 AM
11-27-2010 09:24 AM
Re: Shutdown cluster package with shutdown command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2010 09:25 AM
11-27-2010 09:25 AM