Man page of HAGRP

Maintenance Commands hagrp(1M)

NAME
hagrp - perform VCS service group operations

SYNOPSIS
hagrp -add group

hagrp -autoenable group -sys system

hagrp -clear group [-sys system]

hagrp -delete group

hagrp -dep [group(s)]

hagrp -disable group [-sys system]

hagrp -disableresources group

hagrp -display [group] [-attribute attribute(s)] [-
sys system(s)]

hagrp -enable group [-sys system]

hagrp -enableresources group

hagrp -flush group -sys system

hagrp -freeze group [-persistent]

hagrp -help [-modify | -link | -list]

hagrp -link parent_group child_group dependency

hagrp -list [conditional(s)]

hagrp -modify modify_options

hagrp -offline group -sys system

hagrp [-nopre] -online group -sys system

hagrp -resources group

hagrp -state group -sys system

hagrp -switch group -to system

hagrp -unfreeze group [-persistent]

hagrp -unlink parent_group child_group

VCS 2.0 Last change: January 2002 1

Maintenance Commands hagrp(1M)

hagrp -value group attr [system]

AVAILABILITY
VRTSvcs

DESCRIPTION
A service group is an instance of a computer service that is
made highly available with VCS. A group comprises one or
more resources of various resource types, such as disks,
volumes, or databases. Use the hagrp command to view infor-
mation about and manage each group.

OPTIONS
-add group
Add a service group to the cluster.

-autoenable group -sys system
When VCS does not know the status of a given ser-
vice group on a given system, it marks that ser-
vice group as auto-disabled by setting the
AutoDisabled attribute to 1 for that system. This
can happen if VCS is not running on that system,
or if all the resources in the service group on
that system are not probed yet. A service group
cannot be onlined or failed over if it is auto-
disabled.

If you want to override this behavior, you can use
the autoenable option to clear the AutoDisabled
flag for a service group on a system. For example,
"hagrp -autoenable foo -sys bar" will clear the
AutoDisabled flag for the service group foo on
system bar.

CAUTION: To bring a group online manually after
VCS has autodisabled it, make sure that the group
is not fully or partially active on any system
that has the AutoDisabled attribute set to 1 by
VCS. Specifically, verify that all resources that
may be corrupted by being active on multiple sys-
tems are brought down on the designated systems.
Then, clear the AutoDisabled attribute for each
system:

# hagrp -autoenable service_group -sys system_name

-clear group [-sys system]
Clear all faulted, non-persistent resources in the
specified group by changing their state from
faulted to offline. If no system is specified, all
resources are cleared on all systems in the

VCS 2.0 Last change: January 2002 2

Maintenance Commands hagrp(1M)

group's SystemList. A message is printed if no
faulted, non-persistent resources exist.

-delete group
Delete a service group. The group must have no
resources. To delete resources, use the hares
command.

-dep [group(s)]
Display dependencies between groups.

-disable group [-sys system]
Disable a service group. Actions such as onlining
and switching are not permitted on the group.

-disableresources group
Disable all resources in a service group. Agents
do not monitor the resources in the group.

-display [group] [-attribute attribute(s)] [-sys system(s)]

Display the attributes and their values for a
specified group (or all groups, if no group is
specified).

-enable group [-sys system]
Enable a service group.

-enableresources group
Enable all resources in a service group. Agents
monitor the resources in the group.

-flush group -sys system
Flush a service group and enable corrective
action. All resources in the group that are wait-
ing to go online automatically transition to not
waiting. Resources waiting to go offline remain in
that state. Failovers and switches in progress are
cancelled.

-freeze group [-persistent]
Freeze a service group (disables onlining and off-
lining and failover).

-help [-modify | -link | -list]
Display information about using hagrp. The -modify
option provides modify specific help; the -link
option provides link specific help; the -list
option provides list specific help.

-link parent_group child_group dependency
Specify dependencies between service groups. The

VCS 2.0 Last change: January 2002 3

Maintenance Commands hagrp(1M)

variable dependency is one of the following:

online global [ firm | soft ]
When VCS starts, the child group must be
online on some system in the cluster before
the parent group can come online.

With the dependency set to firm, if the child
group faults, the parent group must go off-
line until the child group fails over to
another system, at which time the parent can
return online. If VCS cannot bring the child
group online in the cluster, the parent group
remains offline.

With the dependency set to soft, if the child
group faults and fails over, the parent group
continues online. If VCS cannot bring the
child group online in the cluster, the parent
group remains online.

online local [ firm | soft ]
When VCS starts, the child group must be
online on the same system in the cluster
before the parent group can go online.

With the dependency set to firm, if the child
group faults, the parent group must go off-
line. If the child fails over, the parent
group comes back online on the same system as
the child. If VCS cannot bring the child
group online in the cluster, the parent group
remains offline.

With the dependency set to soft, if the child
group faults, the parent group continues to
run on the local system until the child fails
over to another system in the cluster, at
which time the parent group will fail over to
the same system as the child. If VCS cannot
bring the child group online in the cluster,
the parent group remains online.

online remote [ firm | soft ]
When VCS starts, the child must be online on
any other system in the cluster before the
parent can go online.

With the dependency set to firm, if the child
group faults, the parent group goes offline.

VCS 2.0 Last change: January 2002 4

Maintenance Commands hagrp(1M)

When the child group fails over to another
system in the cluster, the parent group comes
back online on a system other than the system
on which the child is online. If VCS cannot
bring the child group online in the cluster,
the parent group remains offline.

With the dependency set to soft, if the child
group faults, the parent group continues
online unless VCS attempts to fail over the
child group to the system on which the parent
group is running; in this case, the parent
group is taken offline, to be onlined else-
where. If the child group cannot go online
anywhere in the cluster, the parent stays
online.

offline local
The child group must be offline on the same
system before the parent group can go online.

A group dependency tree may be at most three lev-
els deep, and each parent can have only one child.

Parallel parent groups dependent on parallel child
groups are not supported in online global or
online remote dependencies. The configuration of
parallel parent groups dependent on a failover
child group is not supported in online local
dependencies.

-list [conditional(s)]
Displays a list of groups whose values match
given conditional statement(s). Conditional state-
ments can take three forms: Attribute=Value,
Attribute!=Value, Attribute=~Value. Multiple con-
ditional statements imply AND logic. If no condi-
tional statement is specified, all groups in the
cluster are listed.

-modify modify_options
The -modify option lets you modify a service
group's attributes. You must make the configura-
tion read-write before modifying any attributes.
Some attributes, such as ProbesPending, are inter-
nal to VCS and cannot be modified. You can modify
any attribute that can be configured in main.cf.
Modifiable attributes can be of any type or dimen-
sion, and can be global or local to a system. Use
"hagrp -help -modify" to find out detailed syntax

VCS 2.0 Last change: January 2002 5

Maintenance Commands hagrp(1M)

to modify attributes of any dimension. Modifying
some attributes may have subtle implications. Look
at documentation on individual attribute for
details.

-offline group -sys system
Stop a service group by taking its resources off-
line on the specified system.

-online [-nopre] group -sys system
Start a service group by bringing its resources
online. Resources that have their AutoStart attri-
bute set to zero (the default is one) are not
started by this command unless resources that have
AutoStart set to one depend on the resources. The
-nopre option can be used within a user-defined
PreOnline event trigger script to bring a service
group online without the executing the PreOnline
trigger again.

-resources group
List resources for a service group.

-state group -sys system
Display the current state of the specified group
on the specified system.

-switch group -to system
Switch a service group from the system on which it
is active to the specified system. This applies
only to failover groups (groups that have the
Parallel attribute set to zero).

-unfreeze group [-persistent]
Thaw a service group (reenables onlining, offlin-
ing, and failover).

-unlink parent_group child_group
Remove dependencies between two service groups.
Note that the dependency is not specified.

-value group attr [system]
The -value option provides the value of a single
group attribute. For example, "hagrp -value
groupX State sysb" displays the value of the State
attribute for group groupX on system sysb. The
system name must be specified for local attribute
values but not for global attribute values. The
-value option is used instead of the -display
option when one specific attribute value is needed
rather than a table of many attribute values.

VCS 2.0 Last change: January 2002 6

Maintenance Commands hagrp(1M)

EXAMPLES
To online group db_grp on system thor01, enter:

# hagrp -online db_grp -sys thor01

NOTES
The VCS server may ignore some hagrp commands. For example,
VCS does not allow you to online a failover service group on
a system if the group is online elsewhere in the cluster, or
if the group is faulted on that system.

SEE ALSO
hares(1M)

VCS 2.0 Last change: January 2002 7

你可能感兴趣的:(Go)