Sie sind auf Seite 1von 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 reia!iity re"uired !y VCS.
LLT
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
GAB
!" (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 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.
/etc/llttab
The file contains information that is derived during installation and is
used by the utility lltconfig.
/etc/gabtab
The file contains the information needed to configure the !" driver. This
file is used by the gabconfig utility.
/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 -s *, -& **2-
)sbin)gabdiskconf - i )dev)dsk)c*t2d+s2 -s *.. -& **2.
)sbin)gabdiskhb -a )dev)dsk)c*t2d+s2 -s *, -p a -s **2-
)sbin)gabdiskhb -a )dev)dsk)c*t2d+s2 -s *.. -p h -s **2.
)sbin)gabconfig -c -n2
gabdiskconf
-i 'nitialises the disk region
-s &tart "lock
-& &ignature
gabdiskhb (heartbeat disks)
-a !dd a gab disk heartbeat resource
-s &tart "lock
-p /ort
-& &ignature
gabconfig
-c %onfigure the driver for use
-n 0umber of systems in the cluster.
LLT and GAB Commands
Verifing that links are active for LLT lltstat -n
verbose o!t"!t of the lltstat command lltstat -nvv 1 more
o"en "orts for LLT lltstat -p
dis"la the val!es of LLT config!ration
directives
lltstat -c
lists information abo!t each config!red LLT
link
lltstat -l
List all #A$ addresses in the cl!ster lltconfig -a list
sto" the LLT r!nning lltconfig -2
start the LLT lltconfig -c
verif that GAB is o"erating
gabconfig -a
0ote3 port a indicates that !" is communicating, port h
indicates that $%& is started
sto" GAB r!nning gabconfig -2
start the GAB gabconfig -c -n 4number of nodes5
override the seed val!es in the gabtab file gabconfig -c -6
GAB Port Memberbership
List #embershi" gabconfig -a
%nregister "ort f )opt)$7T&)bin)fsclustadm cfsdeinit
&ort '!nction
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)
Cluster daemons
(igh Availabilit )aemon had
$om"anion )aemon hashadow
Reso!rce Agent daemon 4resource5!gent
*eb $onsole cl!ster managerment daemon %md&erver
Cluster Log Files
Log )irector )var)$7T&vcs)log
"rimar log file (engine log file) )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
hastart >-stale1-force?
Bring the cl!ster into r!nning mode from a
stale state !sing the config!ration file from a
"artic!lar server
hasys -force 4server=name5
sto" the cl!ster on the local server b!t leave
the a""lication/s r!nning- do not failover the
a""lication/s
hastop -local
sto" cl!ster on local server b!t evac!ate
(failover) the a""lication/s to another node
.ithin the cl!ster
hastop -local -evacuate
sto" the cl!ster on all nodes b!t leave the
a""lication/s r!nning
hastop -all -force
Cluster Status
dis"la cl!ster s!mmar hastatus -summary
contin!all monitor cl!ster hastatus
verif the cl!ster is o"erating hasys -display
Cluster Details
information abo!t a cl!ster haclus -display
val!e for a s"ecific cl!ster attrib!te haclus -value 4attribute5
modif a cl!ster attrib!te haclus -modify 4attribute name5 4new5
/nable Link#onitoring haclus -enable Link9onitoring
)isable Link#onitoring haclus -disable Link9onitoring
sers
add a !ser hauser -add 4username5
modif a !ser hauser -update 4username5
delete a !ser hauser -delete 4username5
dis"la all !sers hauser -display
S!stem "perations
add a sstem to the cl!ster hasys -add 4sys5
delete a sstem from the cl!ster hasys -delete 4sys5
#odif a sstem attrib!tes hasys -modify 4sys5 4modify options5
list a sstem state hasys -state
'orce a sstem to start hasys -force
)is"la the sstems attrib!tes hasys -display >-sys?
List all the sstems in the cl!ster hasys -list
$hange the load attrib!te of a sstem hasys -load 4system5 4value5
)is"la the val!e of a sstems nodeid
(/etc/llthosts)
hasys -nodeid
'ree0e a sstem (1o offlining sstem- 1o
gro!"s onlining)
hasys -free@e >-persistent?>-evacuate?
0ote3 main.cf must be in write mode
%nfree0e a sstem ( reenable gro!"s and
reso!rce back online)
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 stae, a .stae fie is created in %VCS&C'()#conf#config. $hen the configuration is put
!ack into read ony mode the .stae fie is removed.
$hange config!ration to read/.rite
mode
haconf -makerw
$hange config!ration to read,onl
mode
haconf -dump -makero
$heck .hat mode cl!ster is r!nning in
haclus -display 1grep -i AreadonlyA
+ B write mode
* B read only mode
$heck the config!ration file
hacf -verify )etc)$7T&)conf)config
0ote3 you can point to any directory as long as it has main.cf and
types.cf
convert a main.cf file into cl!ster
commands
hacf -cftocmd )etc)$7T&)conf)config -dest )tmp
convert a command file into a main.cf
file
hacf -cmdtocf )tmp -dest )etc)$7T&)conf)config
Ser#ice Groups
add a service gro!"
haconf -makerw
hagrp -add groupw
hagrp -modify groupw &ystemList sun* * sun2 2
hagrp -autoenable groupw -sys sun*
haconf -dump -makero
delete a service gro!"
haconf -makerw
hagrp -delete groupw
haconf -dump -makero
change a service gro!"
haconf -makerw
hagrp -modify groupw &ystemList sun* * sun2 2 sun- -
haconf -dump -makero
0ote3 use the Chagrp -display 4group5C to list attributes
list the service gro!"s hagrp -list
list the gro!"s de"endencies hagrp -dep 4group5
list the "arameters of a gro!" hagrp -display 4group5
dis"la a service gro!"2s reso!rce hagrp -resources 4group5
dis"la the c!rrent state of the service gro!" hagrp -state 4group5
clear a fa!lted non,"ersistent reso!rce in a
s"ecific gr"
hagrp -clear 4group5 >-sys? 4host5 4sys5
$hange the sstem list in a cl!ster
D remove the host
hagrp -modify grp=@lnrssd &ystemList -delete 4hostname5
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
hagrp -online 4group5 -sys 4sys5
Sto" a service gro!" and takes its reso!rces
offline
hagrp -offline 4group5 -sys 4sys5
S.itch a service gro!" from sstem to
another
hagrp -switch 4group5 to 4sys5
/nable all the reso!rces in a gro!" hagrp -enableresources 4group5
)isable all the reso!rces in a gro!" hagrp -disableresources 4group5
'ree0e a service gro!" (disable onlining and
offlining)
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
/nable a service gro!". /nabled gro!"s can
onl be bro!ght online
haconf -makerw
hagrp -enable 4group5 >-sys?
haconf -dump -makero
0ote to check run the following command Chagrp -display 1 grep
;nabledC
)isable a service gro!". Sto" from bringing
online
haconf -makerw
hagrp -disable 4group5 >-sys?
haconf -dump -makero
0ote to check run the following command Chagrp -display 1 grep
;nabledC
'l!sh a service gro!" and enable corrective
action.
hagrp -flush 4group5 -sys 4system5
$esources
add a reso!rce
haconf -makerw
hares -add app( (iskroup groupw
hares -modify app( ;nabled *
hares -modify app( (iskroup appdg
hares -modify app( &tart$olumes +
haconf -dump -makero
delete a reso!rce
haconf -makerw
hares -delete 4resource5
haconf -dump -makero
change a reso!rce
haconf -makerw
hares -modify app( ;nabled *
haconf -dump -makero
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
.ide
hares -local 4resource5 4attribute5 4value5
list the "arameters of a reso!rce hares -display 4resource5
list the reso!rces hares -list
list the reso!rce de"endencies hares -dep
$esource "perations
3nline a reso!rce hares -online 4resource5 >-sys?
3ffline a reso!rce hares -offline 4resource5 >-sys?
dis"la the state of a reso!rce( offline- online-
etc)
hares -state
dis"la the "arameters of a reso!rce hares -display 4resource5
3ffline a reso!rce and "ro"agate the
command to its children
hares -offprop 4resource5 -sys 4sys5
$a!se a reso!rce agent to immediatel
monitor the reso!rce
hares -probe 4resource5 -sys 4sys5
$learing a reso!rce (a!tomaticall initiates
the onlining)
hares -clear 4resource5 >-sys?
$esource T!pes
Add a reso!rce t"e hatype -add 4type5
Remove a reso!rce t"e hatype -delete 4type5
List all reso!rce t"es hatype -list
)is"la a reso!rce t"e hatype -display 4type5
List a "artitc!lar reso!rce t"e hatype -resources 4type5
$hange a "artic!lar reso!rce t"es attrib!tes hatype -value 4type5 4attr5
$esource Agents
add a agent pkgadd -d . 4agent package5
remove a agent pkgrm 4agent package5
change a agent n)a
list all ha agents haagent -list
)is"la agents r!n,time information i.e has it
started- is it r!nning 4
haagent -display 4agent=name5
)is"la agents fa!lts haagent -display 1grep :aults
$esource Agent "perations
Start an agent haagent -start 4agent=name5>-sys?
Sto" an agent haagent -stop 4agent=name5>-sys?

Das könnte Ihnen auch gefallen