Friday, April 18, 2008

VERITAS Cluster command list

Cluster operations
Start VCS

hastart [-force-stale]
hasys -force system
Stop VCS

hastop -local [-force-evacuate]
hastop -sys system [-force-evacuate]
hastop -all [-force]
Open, save, save and close configuration

haconf -makerw -dump -dump -makero
Add user

hauser -add user
Basic configuration
Configure service groups

hagrp -add -delete group
hagrp -modify group attribute value
hagrp -link parent_group child_group dependency firmsoft
Configure resources

hares -add resource type group
hares -delete resource
hares -modify resource attribute value
hares -link parent_resource child_resource
Configure Agents, types

hatype -modify type attribute value
Basic operations
Online, offline, switch, flush service group

hagrp -online group -sys system; hagrp -online group -any
hagrp -offline group -sys system; hagrp -offline group -any
hagrp -switch group -sys system; hagrp -switch group -any
hagrp -flush group -sys system
Online, offline resources

hares -online [-ignoreparent] ressource -sys system
hares -offline [-ignoreparent] ressource -sys system
Clear faulted resources

hares -clear resource [-sys system]
hagrp -clear group [-sys system]
hares -probe resource -sys system
Status and verification
VCS status (system,group,resource,agent)

hastatus -summary
LLT status, verification

lltconfig -a list
lltstat -nvv

GAB status, verification

gabconfig -a
gabdiskhb -l
gabdiskx -l
Starting and stopping LLT

lltconfig -c
lltconfig -U
Starting and stopping GAB

gabconfig -c -n seed_number
gabconfig -U
Freezing, unfreezing groups

hagrp -freeze group [-persistent]
hagrp -unfreeze group [-persistent]
Freezing, unfreezing systems

hasys -freeze system [-persistent][-evacuate]
hasys -unfreeze system [-persistent]
Autoenabling groups

hagrp -autoenable group -sys system
Configuration files
llthosts: list of node and name of the each node

cat /etc/llthosts
0 sldnc062dn1
1 sldnc062dn2
llttab: node info + link configuration1

cat /etc/llttab
set-node sldnc062dn2
set-cluster 62
link ce0 /dev/ce:0 - ether - -
link ce3 /dev/ce:3 - ether - -
link-lowpri ce4 /dev/ce:4 - ether - -
gabtab: Start gabconfig, -n 2 mean at least to node should be running

cat /etc/gabtab
/sbin/gabconfig -c -n 2 Main configuration file

ls /etc/VRTSvcs/conf/config
This file will be duplicated on each node, if you need to make a change you will have to run the command "haconf -makerw" then the configuration is "open, read-write mode" all the changes will be apply in memory and a lock file will be creat ".stale", if all cluster node reboot or stop for any reason and the configuration is still open then the cluster will not restart because of the ".stale" file, once you've done a changed you will have to "close, read-only mode" the configuration file using the command "haconf -dump [-makero]". Running this command, will apply changes in conf file on every nodes, remove ".stale" and save the old configuration adding the date at the end of the file.

Log files

ls /var/VRTSvcs/log
CmdServer-log_A.log NIC_A.log Volume_A.log notifier-out_A.log
DiskGroup_A.log Netlsnr_A.log engine_A.log tmp
IP_A.log Oracle_A.log hashadow-err_A.log
Mount_A.log Proxy_A.log hashadow_A.log
The main log file is "engine_A.log"

Basic work
Get the group list
# hagrp -list
ClusterService clust00
ClusterService clust01
arnaudsg clust00
arnaudsg clust01
Get resources list
# hagrp -resources arnaudsg
Get one resource info
# hares -display rno_IP
#Resource Attribute System Value
rno_IP Group global arnaudsg
rno_IP Type global IP
rno_IP AutoStart global 1
rno_IP Critical global 1
rno_IP Enabled global 1
rno_IP LastOnline global clust01
rno_IP MonitorOnly global 0
rno_IP ResourceOwner global unknown
rno_IP TriggerEvent global 0
rno_IP ArgListValues clust00 le1 "" 1 0
rno_IP ArgListValues clust01 le1 "" 1 0
rno_IP ConfidenceLevel clust00 0
rno_IP ConfidenceLevel clust01 100
rno_IP Flags clust00
rno_IP Flags clust01
rno_IP IState clust00 not waiting
rno_IP IState clust01 not waiting
rno_IP Probed clust00 1
rno_IP Probed clust01 1
rno_IP Start clust00 0
rno_IP Start clust01 1
rno_IP State clust00 OFFLINE
rno_IP State clust01 ONLINE
rno_IP Address global
rno_IP ArpDelay global 1
rno_IP ComputeStats global 0
rno_IP Device global le1
rno_IP IfconfigTwice global 0
rno_IP NetMask global
rno_IP Options global
rno_IP ResourceInfo global State Stale Msg TS
rno_IP MonitorTimeStats clust00 Avg 0 TS
rno_IP MonitorTimeStats clust01 Avg 0 TS