06-04-2012 01:37 PM
Thanks for the reply mike.That cleared things abt hagrp -flush.
when we are setting attributes to resource there would be few madatory attributes to be set to bring the resource online.
In GUI this can been known easily as we see the mandatory attributes would be BOLD.Accordingly we would be give values .if somebody body is configuring through CLI how he knows abt the mandatry attributes for any resource ?
Thanks and regards,
Siva
Solved! Go to Solution.
06-04-2012 09:45 PM
Siva,
You can not find the mandatory attributes via a CLI ...
however I believe it should be easy enough to look at resource type & think on what could be mandatory attributes. To ease of you can refer to /etc/VRTSvcs/conf/config/types.cf to refer the attributes a resource has.
For e.g , If I refer a types.cf for diskgroup resource:
type DiskGroup (
static int NumThreads = 1
static int OnlineRetryLimit = 1
static str ArgList[] = { DiskGroup, StartVolumes,
StopVolumes, MonitorOnly }
str DiskGroup
str StartVolumes = 1
str StopVolumes = 1
)
I can look at above & understand only Diskgroup name is the important attribute for resource to work ...
Take another example of commonly used IP resource...
type IP (
static str ArgList[] = { Device, Address, NetMask, Options,
ArpDelay, IfconfigTwice }
str Device
str Address
str NetMask
str Options
int ArpDelay = 1
int IfconfigTwice
)
Here I can clearly imagine that I would need a device name, IP address & netmask mandatorily ...
So in short, refer types.cf & you should be able to pickup from command line ...
G
06-04-2012 01:41 PM
I don't know any easy way from CLI. The only way I know how is to look at the XML that the GUI uses which you can find in agent bin directory - for bundled agents this is /opt/VRTSvcs/bin/Agent-name, but for other agents (like Oracle) the XML files are in /opt/VRTSagents/ha/bin/Agent-name.
Mike
06-04-2012 09:45 PM
Siva,
You can not find the mandatory attributes via a CLI ...
however I believe it should be easy enough to look at resource type & think on what could be mandatory attributes. To ease of you can refer to /etc/VRTSvcs/conf/config/types.cf to refer the attributes a resource has.
For e.g , If I refer a types.cf for diskgroup resource:
type DiskGroup (
static int NumThreads = 1
static int OnlineRetryLimit = 1
static str ArgList[] = { DiskGroup, StartVolumes,
StopVolumes, MonitorOnly }
str DiskGroup
str StartVolumes = 1
str StopVolumes = 1
)
I can look at above & understand only Diskgroup name is the important attribute for resource to work ...
Take another example of commonly used IP resource...
type IP (
static str ArgList[] = { Device, Address, NetMask, Options,
ArpDelay, IfconfigTwice }
str Device
str Address
str NetMask
str Options
int ArpDelay = 1
int IfconfigTwice
)
Here I can clearly imagine that I would need a device name, IP address & netmask mandatorily ...
So in short, refer types.cf & you should be able to pickup from command line ...
G
06-05-2012 03:32 AM
If you just want to list attributes, you can also use hatype command - example:
# hatype -value Application ArgList User StartProgram StopProgram CleanProgram MonitorProgram PidFiles MonitorProcesses
if [ $# -eq 0 ] then agent=* else agent=$1 fi awk ' /mustconfigure=/ { n=split(FILENAME,slash,"/") if ($0 ~ /mustconfigure="True"/) print slash[n-1], " - Mandatory", $1 else print slash[n-1], " - Optional", $1 } ' `ls /opt/VRTSvcs/bin/*/${agent}.xml /opt/VRTSagents/ha/bin/*/${agent}.xml 2>/dev/null` | sort
# ./ls_mand.sh Application Application - Mandatory <StartProgram Application - Mandatory <StopProgram Application - Optional <CleanProgram Application - Optional <MonitorProcesses Application - Optional <MonitorProgram Application - Optional <PidFiles Application - Optional <User