Sunteți pe pagina 1din 6

Veritas Cluster Cheat sheet

VCS uses two components, LLT and GAB to share data over the private networks among systems. These components provide the performance and re ia!i ity re"uired !y VCS.
LLT (Low Latency Transport) provides fast, kernel-to-kernel comms and monitors network connections. The system admin configures the LLT by creating a configuration file (llttab) that describes the systems in the cluster and private network links among them. The LLT runs in layer 2 of the network stack !" ( roup membership and !tomic "roadcast) provides the global message order re#uired to maintain a synchronised state among the systems, and monitors disk comms such as that re#uired by the $%& heartbeat utility. The system admin configures !" driver by creating a configuration file ( gabtab).

LLT

GAB

LLT and GAB files


/etc/llthosts
The file is a database, containing one entry per system, that links the LLT system '( with the hosts name. The file is identical on each server in the cluster. The file contains information that is derived during installation and is used by the utility lltconfig. The file contains the information needed to configure the file is used by the gabconfig utility. !" driver. This

/etc/llttab /etc/gabtab /etc/VRTSvcs/conf/config/main.cf

The $%& configuration file. The file contains the information that defines the cluster and its systems.

Gabtab Entries
)sbin)gabdiskconf - i )dev)dsk)c*t2d+s2 )sbin)gabdiskconf - i )dev)dsk)c*t2d+s2 )sbin)gabdiskhb -a )dev)dsk)c*t2d+s2 -s )sbin)gabdiskhb -a )dev)dsk)c*t2d+s2 -s )sbin)gabconfig -c -n2 -i -s -& -s *, -& **2-s *.. -& **2. *, -p a -s **2*.. -p h -s **2.

gabdiskconf

'nitialises the disk region &tart "lock &ignature !dd a gab disk heartbeat resource &tart "lock /ort &ignature %onfigure the driver for use 0umber of systems in the cluster.

-a -s gabdiskhb (heartbeat disks) -p -&

gabconfig

-c -n

LLT and GAB Commands


Verif ing that links are active for LLT verbose o!t"!t of the lltstat command o"en "orts for LLT dis"la the val!es of LLT config!ration directives lists information abo!t each config!red LLT link List all #A$ addresses in the cl!ster sto" the LLT r!nning start the LLT
lltstat -n lltstat -nvv 1 more lltstat -p lltstat -c lltstat -l lltconfig -a list lltconfig -2 lltconfig -c

gabconfig -a

verif that GAB is o"erating sto" GAB r!nning start the GAB override the seed val!es in the gabtab file

0ote3 port a indicates that !" is communicating, port h indicates that $%& is started gabconfig -2 gabconfig -c -n 4number of nodes5 gabconfig -c -6

GAB Port Memberbership


List #embershi" %nregister "ort f
gabconfig -a )opt)$7T&)bin)fsclustadm cfsdeinit a gab driver b ')8 fencing (designed to guarantee data integrity) d 8(9 (8racle (isk 9anager) f %:& (%luster :ile &ystem) h $%& ($;7'T!& %luster &erver3 high availability daemon) o $%&99 driver (kernel module needed for 8racle and $%& interface) # <uickLog daemon v %$9 (%luster $olume 9anager) w v6configd (module for cvm)

&ort '!nction

Cluster daemons
(igh Availabilit )aemon $om"anion )aemon Reso!rce Agent daemon *eb $onsole cl!ster managerment daemon
had hashadow 4resource5!gent %md&erver

Cluster Log Files


Log )irector "rimar log file (engine log file)
)var)$7T&vcs)log )var)$7T&vcs)log)engine=!.log

Starting and Stopping the cluster


+,stale+ instr!cts the engine to treat the local config as stale +,force+ instr!cts the engine to treat a stale config as a valid one Bring the cl!ster into r!nning mode from a stale state !sing the config!ration file from a "artic!lar server sto" the cl!ster on the local server b!t leave the a""lication/s r!nning- do not failover the a""lication/s sto" cl!ster on local server b!t evac!ate (failover) the a""lication/s to another node .ithin the cl!ster sto" the cl!ster on all nodes b!t leave the a""lication/s r!nning

hastart >-stale1-force?

hasys -force 4server=name5

hastop -local

hastop -local -evacuate hastop -all -force

Cluster Status

dis"la cl!ster s!mmar contin!all monitor cl!ster verif the cl!ster is o"erating

hastatus -summary hastatus hasys -display

Cluster Details
information abo!t a cl!ster val!e for a s"ecific cl!ster attrib!te modif a cl!ster attrib!te /nable Link#onitoring )isable Link#onitoring
haclus -display haclus -value 4attribute5 haclus -modify 4attribute name5 4new5 haclus -enable Link9onitoring haclus -disable Link9onitoring

sers
add a !ser modif a !ser delete a !ser dis"la all !sers
hauser -add 4username5 hauser -update 4username5 hauser -delete 4username5 hauser -display

S!stem "perations
add a s stem to the cl!ster delete a s stem from the cl!ster #odif a s stem attrib!tes list a s stem state 'orce a s stem to start )is"la the s stems attrib!tes List all the s stems in the cl!ster $hange the load attrib!te of a s stem )is"la the val!e of a s stems nodeid (/etc/llthosts) 'ree0e a s stem (1o offlining s stem- 1o gro!"s onlining) %nfree0e a s stem ( reenable gro!"s and reso!rce back online)
hasys -add 4sys5 hasys -delete 4sys5 hasys -modify 4sys5 4modify options5 hasys -state hasys -force hasys -display >-sys? hasys -list hasys -load 4system5 4value5 hasys -nodeid hasys -free@e >-persistent?>-evacuate? 0ote3 main.cf must be in write mode hasys -unfree@e >-persistent? 0ote3 main.cf must be in write mode

D!namic Configuration The VCS configuration must !e in read#write mode in order to make changes. $hen in read#write mode the configuration !ecomes sta e, a .sta e fi e is created in %VCS&C'()#conf#config. $hen the configuration is put !ack into read on y mode the .sta e fi e is removed.
$hange config!ration to read/.rite mode $hange config!ration to read,onl mode
haconf -makerw haconf -dump -makero

$heck .hat mode cl!ster is r!nning in haclus -display 1grep -i AreadonlyA


+ B write mode

* B read only mode hacf -verify )etc)$7T&)conf)config

$heck the config!ration file convert a main.cf file into cl!ster commands

0ote3 you can point to any directory as long as it has main.cf and types.cf hacf -cftocmd )etc)$7T&)conf)config -dest )tmp

convert a command file into a main.cf hacf -cmdtocf )tmp -dest )etc)$7T&)conf)config file

Ser#ice Groups
haconf -makerw hagrp -add groupw hagrp -modify groupw &ystemList sun* * sun2 2 hagrp -autoenable groupw -sys sun* haconf -dump -makero haconf -makerw hagrp -delete groupw haconf -dump -makero haconf -makerw hagrp -modify groupw &ystemList sun* * sun2 2 sun- haconf -dump -makero 0ote3 use the Chagrp -display 4group5C to list attributes

add a service gro!"

delete a service gro!"

change a service gro!"

list the service gro!"s list the gro!"s de"endencies list the "arameters of a gro!" dis"la a service gro!"2s reso!rce clear a fa!lted non,"ersistent reso!rce in a s"ecific gr"

hagrp -list hagrp -dep 4group5 hagrp -display 4group5 hagrp -resources 4group5

dis"la the c!rrent state of the service gro!" hagrp -state 4group5
hagrp -clear 4group5 >-sys? 4host5 4sys5 D remove the host hagrp -modify grp=@lnrssd &ystemList -delete 4hostname5

$hange the s stem list in a cl!ster

D add the new host (donAt forget to state its position) hagrp -modify grp=@lnrssd &ystemList -add 4hostname5 * D update the autostart list hagrp -modify grp=@lnrssd !uto&tartList 4host5 4host5

Ser#ice Group "perations


Start a service gro!" and bring its reso!rces online Sto" a service gro!" and takes its reso!rces offline S.itch a service gro!" from s stem to another /nable all the reso!rces in a gro!" )isable all the reso!rces in a gro!" 'ree0e a service gro!" (disable onlining and offlining)
hagrp -online 4group5 -sys 4sys5 hagrp -offline 4group5 -sys 4sys5 hagrp -switch 4group5 to 4sys5 hagrp -enableresources 4group5 hagrp -disableresources 4group5 hagrp -free@e 4group5 >-persistent? note3 use the following to check Chagrp -display 4group5 1 grep T:ro@enC

%nfree0e a service gro!" (enable onlining and hagrp -unfree@e 4group5 >-persistent?

offlining)

note3 use the following to check Chagrp -display 4group5 1 grep T:ro@enC haconf -makerw hagrp -enable 4group5 >-sys? haconf -dump -makero 0ote to check run the following command Chagrp -display 1 grep ;nabledC haconf -makerw hagrp -disable 4group5 >-sys? haconf -dump -makero 0ote to check run the following command Chagrp -display 1 grep ;nabledC

/nable a service gro!". /nabled gro!"s can onl be bro!ght online

)isable a service gro!". Sto" from bringing online

'l!sh a service gro!" and enable corrective action.

hagrp -flush 4group5 -sys 4system5

$esources
haconf -makerw hares -add app( (isk roup groupw hares -modify app( ;nabled * hares -modify app( (isk roup appdg hares -modify app( &tart$olumes + haconf -dump -makero haconf -makerw hares -delete 4resource5 haconf -dump -makero haconf -makerw hares -modify app( haconf -dump -makero ;nabled *

add a reso!rce

delete a reso!rce

change a reso!rce

0ote3 list parameters Chares -display 4resource5C

change a reso!rce attrib!te to be globall .ide

hares -global 4resource5 4attribute5 4value5

change a reso!rce attrib!te to be locall hares -local 4resource5 4attribute5 4value5 .ide list the "arameters of a reso!rce list the reso!rces list the reso!rce de"endencies
hares -display 4resource5 hares -list hares -dep

$esource "perations
3nline a reso!rce 3ffline a reso!rce
hares -online 4resource5 >-sys? hares -offline 4resource5 >-sys?

dis"la the state of a reso!rce( offline- online- hares -state etc) dis"la the "arameters of a reso!rce 3ffline a reso!rce and "ro"agate the command to its children $a!se a reso!rce agent to immediatel monitor the reso!rce $learing a reso!rce (a!tomaticall initiates the onlining)
hares -display 4resource5 hares -offprop 4resource5 -sys 4sys5 hares -probe 4resource5 -sys 4sys5 hares -clear 4resource5 >-sys?

$esource T!pes

Add a reso!rce t "e Remove a reso!rce t "e List all reso!rce t "es )is"la a reso!rce t "e List a "artitc!lar reso!rce t "e

hatype -add 4type5 hatype -delete 4type5 hatype -list hatype -display 4type5 hatype -resources 4type5

$hange a "artic!lar reso!rce t "es attrib!tes hatype -value 4type5 4attr5

$esource Agents
add a agent remove a agent change a agent list all ha agents
pkgadd -d . 4agent package5 pkgrm 4agent package5 n)a haagent -list

)is"la agents r!n,time information i.e has it haagent -display 4agent=name5 started- is it r!nning 4 )is"la agents fa!lts
haagent -display 1grep :aults

$esource Agent "perations


Start an agent Sto" an agent
haagent -start 4agent=name5>-sys? haagent -stop 4agent=name5>-sys?

S-ar putea să vă placă și