Thursday, December 12, 2013

VERITAS CLUSTER COMMANDS


To check List

[root@iptvdb1]hagrp -list
ClusterService          iptvdb1
ClusterService          iptvdb2
oracle-rg               iptvdb1
oracle-rg               iptvdb2

To check status

[root@iptvdb1] hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  iptvdb1              RUNNING              0
A  iptvdb2              RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled    State

B  ClusterService  iptvdb1              Y          N               ONLINE
B  ClusterService  iptvdb2              Y          N               OFFLINE
B  oracle-rg       iptvdb1                 Y          N               ONLINE
B  oracle-rg       iptvdb2                 Y          N               OFFLINE

To Switch system 

hagrp -switch  <service group name> -to <system name>

 1> hagrp -switch  oracle-rg -to iptvdb2    
after complete switch then issue below command           
2> hagrp -switch  ClusterService   -to  iptvdb2              

** First switch Oracle Resource Group 
**Second switch Cluster resource Group

To check all information about Service Group

[root@iptvdb1] hagrp -display oracle-rg
#Group       Attribute             System     Value
oracle-rg    Administrators        global
oracle-rg    Authority             global     0
oracle-rg    AutoFailOver          global     1
oracle-rg    AutoRestart           global     1
oracle-rg    AutoStart             global     1
oracle-rg    AutoStartIfPartial    global     1
oracle-rg    AutoStartList         global     iptvdb1 iptvdb2
oracle-rg    AutoStartPolicy       global     Order
oracle-rg    ClusterFailOverPolicy global     Manual
oracle-rg    ClusterList           global
oracle-rg    Evacuate              global     1
oracle-rg    ExtMonApp             global
oracle-rg    ExtMonArgs            global
oracle-rg    FailOverPolicy        global     Priority
oracle-rg    FaultPropagation      global     1
oracle-rg    Frozen                global     0
oracle-rg    GroupOwner            global
oracle-rg    IntentOnline          global     1
oracle-rg    Load                  global     0
oracle-rg    ManageFaults          global     ALL
oracle-rg    ManualOps             global     1
oracle-rg    NumRetries            global     0
oracle-rg    OnlineRetryInterval   global     0
oracle-rg    OnlineRetryLimit      global     0
oracle-rg    Operators             global
oracle-rg    Parallel              global     0
oracle-rg    PreOffline            global     0
oracle-rg    PreOnline             global     0
oracle-rg    PreonlineTimeout      global     300
oracle-rg    Prerequisites         global
oracle-rg    PrintTree             global     1
oracle-rg    Priority              global     0
oracle-rg    Restart               global     0
oracle-rg    SourceFile            global     ./main.cf
oracle-rg    SystemList            global     iptvdb1 0 iptvdb2 1
oracle-rg    SystemZones           global
oracle-rg    TFrozen               global     0
oracle-rg    Tag                   global     Oracle
oracle-rg    TriggerEvent          global     1
oracle-rg    TriggerResStateChange global     0
oracle-rg    TypeDependencies      global
oracle-rg    UserIntGlobal         global     0
oracle-rg    UserStrGlobal         global
oracle-rg    AutoDisabled          iptvdb1    0
oracle-rg    AutoDisabled          iptvdb2    0
oracle-rg    Enabled               iptvdb1    1
oracle-rg    Enabled               iptvdb2    1
oracle-rg    PreOfflining          iptvdb1    0
oracle-rg    PreOfflining          iptvdb2    0
oracle-rg    PreOnlining           iptvdb1    0
oracle-rg    PreOnlining           iptvdb2    0
oracle-rg    Probed                iptvdb1    1
oracle-rg    Probed                iptvdb2    1
oracle-rg    ProbesPending         iptvdb1    0
oracle-rg    ProbesPending         iptvdb2    0
oracle-rg    State                 iptvdb1    |ONLINE|
oracle-rg    State                 iptvdb2    |OFFLINE|
oracle-rg    UserIntLocal          iptvdb1    0
oracle-rg    UserIntLocal          iptvdb2    0
oracle-rg    UserStrLocal          iptvdb1
oracle-rg    UserStrLocal          iptvdb2
oracle-rg    VCSi3Info             iptvdb1
oracle-rg    VCSi3Info             iptvdb2

#####################################################################

Cluster Status
hastatus -summary – Outputs the status of cluster
hasys -display – Displays the cluster operation status
Start or Stop services
hastart [-force|-stale] – ‘force’ is used to load local configuration
hasys -force 'system' – start the cluster using config file from the mentioned “system”
hastop -local [-force|-evacuate] – ‘local’ option will stop the service only on the system you type the command
hastop -sys 'system' [-force|-evacuate] – ‘sys’ stops had on the system you specify
hastop -all [-force] – ‘all’ stops had on all systems in the cluster
Change VCS Configuration online
haconf -makerw – makes VCS configuration in read/write mode
haconf -dump -makero – Dumps the configuration changes
Agent Operations
haagent -start agent_name -sys system – Starts an agent
haagent -stop agent_name -sys system – Stops an agent
Cluster Operations
haclus -display – Displays cluster information and status
haclus -enable LinkMonitoring – Enables heartbeat link monitoring in the GUI
haclus -disable LinkMonitoring – Disables heartbeat link monitoring in the GUI
Add and Delete Users
hauser -add user_name – Adds a user with read/write access
hauser -add VCSGuest – Adds a user with read-only access
hauser -modify user_name – Modifies a users password
hauser -delete user_name – Deletes a user
hauser -display [user_name] – Displays all users if username is not specified
System Operations
hasys -list – List systems in the cluster
hasys -display – Get detailed information about each system
hasys -add system – Add a system to cluster
hasys -delete system – Delete a system from cluster
Resource Types
hatype -list – List resource types
hatype -display [type_name] – Get detailed information about a resource type
hatype -resources type_name – List all resources of a particular type
hatype -add resource_type – Add a resource type
hatype -modify .... – Set the value of static attributes
hatype -delete resource_type – Delete a resource type
Resource Operations
hares -list – List all resources
hares -dep [resource] – List a resource’s dependencies
hares -display [resource] – Get detailed information about a resource
hares -add resource_type service_group – Add a resource
hares -modify resource attribute_name value – Modify the attributes of the new resource
hares -delete resource – Delete a resource type
hares -online resource -sys systemname – Online a resource, type
hares -offline resource -sys systemname – Offline a resource, type
hares -probe resource -sys system – Cause a resource’s agent to immediately monitor the resource on a particular system
hares -clear resource [-sys system] – Clear a faulted resource
hares -local resource attribute_name value – Make a resource’s attribute value local
hares -global resource attribute_name value – Make a resource’s attribute value global
hares -link parent_res child_res – Specify a dependency between two resources
hares -unlink parent_res child_res – Remove the dependency relationship between two resources
Service Group Operations
hagrp -list – List all service groups
hagrp -resources [service_group] – List a service group’s resources
hagrp -dep [service_group] – List a service group’s dependencies
hagrp -display [service_group] – Get detailed information about a service group
hagrp -online groupname -sys systemname – Start a service group and bring it resources
hagrp -offline groupname -sys systemname – Stop a service group and take it resources offline
hagrp -switch groupname -to systemname – Switch a service group from one system to another
hagrp -freeze -sys -persistent – Gets into Maintenance Mode. Freeze a service group. This will disable online and offline operations
hagrp -unfreeze -sys -persistent] – Take the servicegroup out of maintenance mode
hagrp -enable service_group [-sys system] – Enable a service group
hagrp -disable service_group [-sys system] – Disable a service group
hagrp -enableresources service_group – Enable all the resources in a service group
hagrp -disableresources service_group – Disable all the resources in a service group
hagrp -link parent_group child_group relationship – Specify the dependency relationship between two service groups
hagrp -unlink parent_group child_group – Remove the dependency between two service groups

Use Cases of Oracle Grid Control

  Use Cases of Oracle Grid Control  Oracle Grid Control was designed for centralized management of on‑premise Oracle IT infrastructure , es...