You are on page 1of 6

Veritas Cluster - Commands

VRTSvcs VRTSvcswz VRTScsga VRTSgab VRTSllt VRTSvcsor VRTSvcssy VRTSperl Cluster Nodes Service group Resource Attributes Dependencies Cluster Mgr Cluster Mgr Cluster Mgr Cluster Mgr LLT GAB Config files VERITAS VERITAS VERITAS VERITAS VERITAS VERITAS VERITAS VERITAS Cluster Server Cluster Server Wizard Cluster Server Graphical Administrator Group Membership and Atomic Broadcast Low Latency Transport Cluster Server Oracle Enterprise Extension Cluster Server Sybase Enterprise Extension Perl for VRTSvcs

Name of your HA environment Physical systems that make up the cluster Abstract container of related resources Cluster components (i.e. NICs, IPs, disk groups, volumes, mounts, processes, etc...) Parameter values that define the resources Links between resources or service groups Cluster Monitor : Log in, add clusters, change preferences Cluster Explorer: Monitor systems, service grps, resources, attributes & dependencies Log Desk : Monitor log messages received from engine, view GUI commands Command Center : Build VCS commands and send to engine Low Latency transport provides fast kernel-kernel comm. & monitors network connx. Grp membership & Atomic Broadcast maintains a synch. state & monitors disk comm.

VCS etc directory $VCSETC=/etc/VRTSvcs Config files VCS configuration directories $VCSCONF=/etc/VRTSvcs/conf/config Binary files VCS opt directory $VCSOPT=/opt/VRTSvcs Binary files VCS binary path $VCSBIN=/opt/VRTSvcs/bin Log files VCS log path $VCSLOG=/var/VRTSvcs/log Config files VCS configuration file /etc/VRTSvcs/conf/config/main.cf LLT tab file LLT configuration file /etc/llttab LLT hosts file LLT host name database /etc/llthosts GAB file Grp membership & Atomic Broadcast file /etc/gabtab quick-start quick-NFS llt llt VCS Quick-start wizard # $VCS_HOME/wizards/config/quick_start VCS Quick-NFS wizard # $VCS_HOME/wizards/services/quick_nfs Verify LLT # /sbin/llstat -n Get interface MAC Address

# /opt/VRTSllt/getmac device_name Check network connectivity # /opt/VRTSllt/dlpiping -s|-c -v device_name gab Verify GAB # /sbin/gabconfig -a ; /sbin/gabconfig -l hasys List systems in cluster # /opt/VRTSvcs/bin/hasys -list hasys Detailed info on each cluster node # /opt/VRTSvcs/bin/hasys -display (sysname) hasys Increase system count in gabtab startup # /opt/VRTSvcs/bin/hasys -add (sysname) hasys Delete a system # /opt/VRTSvcs/bin/hasys -delete (sysname) hastart Start VCS cluster # /opt/VRTSvcs/bin/hastart hastart Force start a stale VCS cluster # /opt/VRTSvcs/bin/hastart -force -stale hastop Stop VCS on all systems # /opt/VRTSvcs/bin/hastop -all hastop Stop VCS had, keep srvc-groups running # /opt/VRTSvcs/bin/hastop -local -force hastop Stop VCS, migrate srvc-groups to sysname # /opt/VRTSvcs/bin/hastop -sys (sysname) -evacuate hastatus Provide continual status of service grps # /opt/VRTSvcs/bin/hastatus hastatus Verify status of service groups # /opt/VRTSvcs/bin/hastatus -summary hacf Check for syntax errors in main.cf # /opt/VRTSvcs/bin/hacf -verify /etc/VRTSvcs/conf/config/main.cf hacf Generate dependency tree in main.cf # /opt/VRTSvcs/bin/hacf -generate /etc/VRTSvcs/conf/config/main.cf llt hares List all resources # /opt/VRTSvcs/bin/hares -list hares List a resource's dependencies # /opt/VRTSvcs/bin/hares -dep (resource_name) hares Get detailed info on a resource # /opt/VRTSvcs/bin/hares -display (resource) hares Add a resource # /opt/VRTSvcs/bin/hares -add (resource_name (resource_type (service_group) hares Modify attributes of the new resource # /opt/VRTSvcs/bin/hares -modify (resource_name (attribute_name (value) hares Delete a resource # /opt/VRTSvcs/bin/hares -delete (resource_name) hares Online a resource # /opt/VRTSvcs/bin/hares -online (resource_name) -sys (system_name) hares Offline a resource # /opt/VRTSvcs/bin/hares -offline (resource_name) -sys (system_name) hares Monitor resource on a system # /opt/VRTSvcs/bin/hares -probe (resource_name) -sys (system_name) hares Clear a faulted resource # /opt/VRTSvcs/bin/hares -clear (resource_name) [-sys

system_name] hares

Make a resource's attribute value local # /opt/VRTSvcs/bin/hares -local (resource_name) (attribute_name) value) hares Make a resource's attribute value global # /opt/VRTSvcs/bin/hares -global (resource_name) (attribute_name) value) hares Specify a dependency between 2 resources # /opt/VRTSvcs/bin/hares -link (parent_res) (child_res) hares Remove dependency between 2 resources # /opt/VRTSvcs/bin/hares -unlink (parent_res) (child_res) hares Modify a Share res. by adding options # /opt/VRTSvcs/bin/hares Share_cicgt-as4-p_apps Options "%-o rw,root=dcsa-cln1" hagrp hagrp hagrp hagrp hagrp (system_name) hagrp (system_name) hagrp (system_name) hagrp hagrp persistent] hagrp system_name] hagrp system_name] hagrp Switch service group between nodes # /opt/VRTSvcs/bin/hagrp -switch (service_group) -to Freeze svcgroup, (disable onl. & offl.) # /opt/VRTSvcs/bin/hagrp -freeze (service_group) [-persistent] Thaw a svcgroup, (enable onl. & offl.) # /opt/VRTSvcs/bin/hagrp -unfreeze (service_group) [Enable a service group # /opt/VRTSvcs/bin/hagrp -enable (service_group) [-sys Disable a service group # /opt/VRTSvcs/bin/hagrp -disable (service_group) [-sys List all service groups # /opt/VRTSvcs/bin/hagrp -list List a service group's resources # /opt/VRTSvcs/bin/hagrp -resources [service_group] List a service group's dependencies # /opt/VRTSvcs/bin/hagrp -dep [service_group] Detailed info about a service group # /opt/VRTSvcs/bin/hagrp -display [service_group] Start service group, bring res. online # /opt/VRTSvcs/bin/hagrp -online (service_group) -sys Stop service group, bring res. offline # /opt/VRTSvcs/bin/hagrp -offline (service_group) -sys

Enable all resources in a service group # /opt/VRTSvcs/bin/hagrp -enableresources (service_group) hagrp Disable all resources in a service group # /opt/VRTSvcs/bin/hagrp -disableresources (service_group) hagrp Specify dependenciy between 2 svc groups # /opt/VRTSvcs/bin/hagrp -link (parent_group) (child_group) (relationship) hagrp Remove dependenciy between 2 svc groups # /opt/VRTSvcs/bin/hagrp -unlink (parent_group) (child_group) hagrp Auto-Enable a servicegroup marked # /opt/VRTSvcs/bin/hagrp -autoenable (service_group) [-sys system_name] disabled due to prob with system_name.

hatype hatype hatype hatype hatype hatype haattr /

List resource types # /opt/VRTSvcs/bin/hatype -list Detailed info on a resource type # /opt/VRTSvcs/bin/hatype -display (resource_type) List all resources of a part. type # /opt/VRTSvcs/bin/hatype -resources (resource_type) Add a resource type # /opt/VRTSvcs/bin/hatype -add (resource_type) Set static attribute values # /opt/VRTSvcs/bin/hatype -modify ... Delete a resource type # /opt/VRTSvcs/bin/hatype -delete (resource_type) Add Attribute to a Type definition # /opt/VRTSvcs/bin/haattr -add (resource_type) (attribute_name)

(attribute_type -integer, -string, -vector) Delete a Entry in a Type definition # /opt/VRTSvcs/bin/haattr -delete (resource_type) (attribute_name) haconf Set VCS configuration file to r/w mode # /opt/VRTSvcs/bin/haconf -makerw haconf Set VCS configuration file to read mode # /opt/VRTSvcs/bin/haconf -dump -makero hauser Add a user with r/w access to VCS # /opt/VRTSvcs/bin/hauser -add (user_name) hauser Add a user with read access only to VCS # /opt/VRTSvcs/bin/hauser -add VCSGuest hauser Update a user # /opt/VRTSvcs/bin/hauser -update (user_name) hauser Delete a user # /opt/VRTSvcs/bin/hauser -delete (user_name) hauser Display all users # /opt/VRTSvcs/bin/hauser -display haagent Start agents manually # haagent -start (agent_name) -sys (system_name) haagent Stop agents manually # haagent -stop (agent_name) -sys (system_name) hagui Start Cluster Manager # /opt/VRTSvcs/bin/hagui hagui Start Cluster Manager in debug mode # /opt/VRTSvcs/bin/hagui -D haattr

Product Terminology comparisons Sun SC 2.2 Veritas VCS 1.1 -----------------------------------------------------cluster name cluster name admin workstation physical node A local system physical node B remote system physical node IP address maintenance IP address logical host service group logical host IP address service group IP address resources disk group disk group private heartbeats communication channels GAB disk (disk heartbeat) Quorum disk Admin filesystem scinstall Quick-Start wizard split-brain network partition configuration files: /etc/llthosts /etc/llttab /etc/gabtab /etc/VRTSvcs/conf/config/main.cf /etc/VRTSvcs/conf/config/sysname

1. How do check the status of VERITAS Cluster Server aka VCS ? Ans: hastatus sum 2. Which is the main config file for VCS and where it is located? Ans: main.cf is the main configuration file for VCS and it is located in /etc/VRTSvcs/conf/config. 3. Which command you will use to check the syntax of the main.cf ? Ans: hacf -verify /etc/VRTSvcs/conf/config 4. How will you check the status of individual resources of VCS cluster? Ans: hares state 5. What is the service group in VCS ? Ans: Service group is made up of resources and their links which you normally requires to maintain the HA of application. 6. What is the use of halink command ? Ans: halink is used to link the dependencies of the resources 7. What is the difference between switchover and failover ? Ans: Switchover is an manual task where as failover is automatic. You can switchover service group from online cluster node to offline cluster node in case of power outage, hardware failure, schedule shutdown and reboot. But the failover will failover the service group to the other node when VCS heartbeat link down, damaged, broken because of some disaster or system hung. 8. What is the use of hagrp command ? Ans: hagrp is used for doing administrative actions on service groups like online, offline, switch etc. 9. How to switchover the service group in VCS ? Ans: hagrp switch -to 10. How to online the service groups in VCS ? Ans: hagrp online -sys

You might also like