- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Implementing rc start/stop scripts within Serv...
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
06-11-2003 07:08 AM
06-11-2003 07:08 AM
What are the normal steps to add rc startup/shutdown scripts into the cluster startup/shutdown? Is it typical to include the steps in the normal /sbin/rc?.d/S* and /sbin/rc?-1.d/K* directories or would this information typically be in a cmcluster subdirectory or configuration file?
Any recommendations?
Thanks...
Jack...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 07:12 AM
06-11-2003 07:12 AM
Re: Implementing rc start/stop scripts within Service Guard
Shutdown/startup should now be handled by the cluster. Refer to the book "managing MC/ServiceGuard" for how to create a script for a package.
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 07:13 AM
06-11-2003 07:13 AM
Re: Implementing rc start/stop scripts within Service Guard
If you are talking about the scripts that would run when you start or stop a package, you'll find two sections in the package control file named 'customer_defined_run_cmds' and 'customer_defined_halt_cmds'. Put your stop and start commands in those sections and the package will execute them when you start and stop the package.
As for the rc scripts, you should have an /sbin/init.d/cmcluster script that will start and stop the MC/SG cluster during boot and shutdown. It should have the appropriate links in /sbin/rc2.d and /sbin/rc3.d to run the kill and start script. All this should be put in place automatically when you swinstall MC/SG.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 07:15 AM
06-11-2003 07:15 AM
Re: Implementing rc start/stop scripts within Service Guard
From your question it looks like you have not a clear concept of a "package" in HPUX... or am i wrong ?
However:
if you mean with rc start and stop script, the script used for starting your application, it's best practice (=compulsory) to create a directory under
/etc/cmcluster/DIR
put your control script there and whatever else is needed.
replicate this directory over the two nodes
create and apply the package
punt your custom commands in the customer_defined_start_function and customer_defined_halt_function
leaving the "test 51" and "test 52" there.
Start and stop script shall never be issued with start/stop of the server, they must be run from the cluster software, to avoid conflicts.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 07:20 AM
06-11-2003 07:20 AM
Re: Implementing rc start/stop scripts within Service Guard
All other PACKAGE related startup/shutdown routines (including VG activation) should be handled by the package control scripts.
The other startup/shutdown file that will need some attention is /etc/lvmrc. You should set AUTO_VG_ACTIVATE=0 and then include explicit vgchange statements for the VG's (other than vg00) which are NOT under the control of a package.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 07:35 AM
06-11-2003 07:35 AM
Re: Implementing rc start/stop scripts within Service Guard
Do the start/stop scripts get placed before or after the test_return 51 / test_return 52?
Is it also best practice to create a single file with links for the start/stop arguments like /sbin/rc3.d/S... ?
I would have files/links something like
/etc/cmcluster/PACKAGENAME/informix
/etc/cmcluster/PACKAGENAME/S100informix
/etc/cmcluster/PACKAGENAME/K900informix.
The start/stop arguments would be passed to the links.
I would likely prefer to put the S*, K* links in rc subdirectories to be consisent with /sbin/rc?.d.
Thanks all.
I'll be assigning points shortly.
jack...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 07:44 AM
06-11-2003 07:44 AM
Re: Implementing rc start/stop scripts within Service Guard
Thanks to all..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 08:12 AM
06-11-2003 08:12 AM
Solutionstart and stop are to be placed *before* the test 51 and 52.
These values are used to test the correctness of your scripts, examining the return code of the last command.
Pay attention in using commands inside remsh, because the return code of the remsh is 0 if the remsh works, 1 the other ways, and it takes in no consideration the command itself.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 08:19 AM
06-11-2003 08:19 AM
Re: Implementing rc start/stop scripts within Service Guard
for the links: i prefer to create the script in the /etc/cmcluster/PACKAGENAME, and keep them aligned.
If you rely on the system part of the cluster, sooner or later someone will change this file on one server and not on the other, and it will be hard to understand.
If you use only the scripts in the /etc/cluster/*, it is easier to keep them on-line, and when you work with a cluster, specularity it a must.
HTH,
Massimo