- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- VG[@] in legacy package - what is this called in a...
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
Discussions
Discussions
Forums
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
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
тАО07-19-2010 02:39 AM
тАО07-19-2010 02:39 AM
Have a question regarding modular clusterpackages.
In some old legacy packages, we have some SERVICE cmd's called with an variable array, including all the volumegroups for the package - this array is called VG[@], and is defined in the cntl-file.
However, if I want to do something similar in a modular package, what is the variable name? I have tried with the same thing, in lowercase (vg[@]) but it does now work? And I can't find any documentation about this, but it might just be me.
Thanks in advance for any help provided.
Kind regards
Danny Petterson
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 03:04 AM
тАО07-19-2010 03:04 AM
Re: VG[@] in legacy package - what is this called in a modular package?
# "vg" is used to specify which volume groups are used by this package.
#
# volume groups
#
# Specify which volume groups are used by this package that do not yet
# have file systems mounted on them. Copy one of the example vg configuration
# line and change the name of the volume group. Add additional VG
# specifications for additional volume groups.
#
# For example, if this package uses your volume groups vg01 and vg02, enter:
# vg vg01
# vg vg02
#
# The volume group activation method is defined above. Use the parameters
# in the filesystem module (fs_name, etc.) to specify the filesystems
# associated with these volume groups.
#
# Legal values for vg: /^[0-9A-Za-z\/][0-9A-Za-z_.\/\-]*[0-9A-Za-z]$/, /^[0-9A-Za-z]$/.
#vg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 03:23 AM
тАО07-19-2010 03:23 AM
Re: VG[@] in legacy package - what is this called in a modular package?
Thanks a lot for your reply.
Unfortunately it does not help - I already reviewed the information in the ascii-configuration files for the modular package, and as described in the section you have copied from such an ascii-file, all volume-groups are defined by "vg", where they, in a legacy package, would be definned with "VG[0]", "VG[1]" etc, which makes it possible to send the entire array (VG[@]) to script in the cntl-file.
So we are kind of back to square one - how do I call an external script/service_cmd with an array containing all volume groups defined in the package (without hardcoding them myself)?
Again, thanks a lot for your time.
Kind regards
Danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 05:39 AM
тАО07-19-2010 05:39 AM
Re: VG[@] in legacy package - what is this called in a modular package?
This may give you the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 05:49 AM
тАО07-19-2010 05:49 AM
Re: VG[@] in legacy package - what is this called in a modular package?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 06:45 AM
тАО07-19-2010 06:45 AM
SolutionThis gives you a big pile of environment variables, all named with the "SG_" prefix.
After the above-mentioned command, I think it should be possible to use "SG_VG[@]" as equivalent to the old "VG[@]".
The example external_script in the "Managing Serviceguard" manual contains a robust-looking strategy for reading the environment variables:
--------
#!/bin/sh
# Source utility functions.
if [[ -z $SG_UTILS ]]
then
. /etc/cmcluster.conf
SG_UTILS=$SGCONF/scripts/mscripts/utils.sh
fi
if [[ -f ${SG_UTILS} ]]; then
. ${SG_UTILS}
if (( $? != 0 ))
then
echo "ERROR: Unable to source package utility functions file: ${SG_UTILS}"
exit 1
fi
else
echo "ERROR: Unable to find package utility functions file: ${SG_UTILS}"
exit 1
fi
# Get the environment for this package through utility function
# sg_source_pkg_env().
sg_source_pkg_env $*
---------
To see all the variables available, simply run:
cmgetpkgenv
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2010 04:45 AM
тАО07-20-2010 04:45 AM
Re: VG[@] in legacy package - what is this called in a modular package?
Thanks a lot, that was great.
Lot of greetings from
Danny