- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Package start script or utility
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-11-2004 01:48 AM
11-11-2004 01:48 AM
Package start script or utility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 02:01 AM
11-11-2004 02:01 AM
Re: Package start script or utility
I did something similar but was too lazy to "reinvent the wheel" and rescript all those handy custom functions the cmmakepkg command provides as a template.
Thus I extracted what seemed reusable from there, and sourced it in my script to invoke those functions.
Maybe also an option for you?
The part that did this looks something like this:
# code reuse of handy functions
TMP_CMLIB=$(mktemp)
cmmakepkg -s |\
sed -n '/# START OF RUN FUNCTIONS/,/# END OF FUNCTIONS COMMON TO BOTH RUN AN
D HALT/p' \
> $TMP_CMLIB
if [ -s $TMP_CMLIB ]; then
echo "Dumped custom functions to $TMP_CMLIB"
. $TMP_CMLIB
echo "Sourced custom functions from $TMP_CMLIB:"
typeset -f|grep function
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 02:08 AM
11-11-2004 02:08 AM
Re: Package start script or utility
I also inserted a custom function that touch-es some sort of semaphore file to indicate that the cluster services should start up in maintenance mode.
Then in the customer_defined_*_cmds() funcs there are test blocks that look for this file, and if found only do VG activation, FS checking and mounting, IP address binding etc. (whatever your needs are).
After ending maintenance one has to halt the packages with the semaphore file in place, then remove the file and restart normally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 02:17 AM
11-11-2004 02:17 AM
Re: Package start script or utility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 03:01 AM
11-11-2004 03:01 AM
Re: Package start script or utility
I have never gotten to situations where I had to do like this. However as long as you have the 'cluster' up and running, you should be able to use 'package.cntl start|stop' to bring up/down the package outside serviceguard. However, you will not be able to bring up/down the services and resources even if serviceguard is running as they use cm*serv and cm*res commands. And you will have to modify it quite a bit like changing 'cmmodnet' command to 'ifconfig' etc., if the cmcld process is not running.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 03:01 AM
11-11-2004 03:01 AM
Re: Package start script or utility
cd /etc/cmcluster/pkg
. ./pkg.cntl
activate_volume_group
check_and_mount
add_ip_address
customer_defined_run_cmds
This should work when the cluster is down except you cannot do a vgchange -a e (exclusive) with cluster services down. I assume you could export the VG and then reimport and mark as not sharable.
Thanks for the insite
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 03:40 AM
11-11-2004 03:40 AM
Re: Package start script or utility
vgchange -c n vgXX
Issueing this command, however seems to require a running cmlvmd daemon which is part of cluster services of a running cluster.
So a bit like the hen and egg catch once again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 03:45 AM
11-11-2004 03:45 AM
Re: Package start script or utility
-c cluster Control the membership of volume groups in a
high availability cluster. cluster can have
one of the following values:
y Mark each specified volume group as
a member of the high availability
cluster. The high availability
software must be running;
otherwise, the volume group is not
marked. Needs to be done on one
node only.
n Remove each specified volume group
from membership in the high
availability cluster. The high
availability software does not need
to be running.
So revocation shouldn't be the problem.
But if my memory serves me correctly I can recall once having had enormous difficulties to reset the bit in absence of cluster services.
Unfortunately I have only productive servers under my "reign", where I cannot get hands on to give it try right now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 03:48 AM
11-11-2004 03:48 AM
Re: Package start script or utility
If the cluster is down, you will not be able to add the package IP address either as 'cmmodnet' fails if it doesn't find cmcld process. You will need to use ifconfig to bypass that issue. The best bet is to have atleast the cluster up and running for minimum modifications.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 05:29 AM
11-11-2004 05:29 AM
Re: Package start script or utility
DKKBRC00006487
(locate by document ID in the Knowledge Database search tool)
-SD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2004 11:56 PM
11-11-2004 11:56 PM
Re: Package start script or utility
Thanks for all your help and quick responses.