Showing posts with label SUN cluster. Show all posts
Showing posts with label SUN cluster. Show all posts

Wednesday, May 13, 2009

Xclock ca resursa failover in SUN cluster

Asta e raspunsul pe care l-am dat unuia pe sunmanagers pentru a seta Xclock ca resursa in SUN cluster .... si cica i-a mers :-)

On any of the two nodes:

first you need to create the resorce type
the command to do this should look smth like this:

scdscreate -k -V SUN -T XCLOCK

Then you should create the resource package
the command to do this should look smth like this:

scdsconfig -s "/path_to_application_start_script" /
-t "/path_to_application_stop_script" /
-m "/path_to_application_monitor_script"
It's a goo idea to keep the rtconfig file (mv rtconfig SUNXCLOCK/ )
Now in SUNXCLOCK/pkg you should have got
a package for your resource

Install the obtained package on both nodes !!

pkgadd -d name_of_the_package

Register the resource in the cluster (to be done on only one node)

scrgadm -a -t SUN.XCLOCK

Create the resource group and then the resorce itself in the cluster (to be done on only one node):

scrgadm -a -g resorce-group-name

scrgadm -a -j resource-name -g resource-group-name -t SUN.XCLOCK

Activate the resource

scswitch -e -j resource-name

Good luck !!

Veritas cluster stuff

# Status resurse / grupuri in cluster
hastatus -sum |less
# Ca sa pot pune resursa online dupa ce resursa a fost marcata ca faulted pe ambele noduri:
hares -clear java_app -sys napoli
hares -clear java_app -sys roma
# O pun online pe napoli:
hagrp -online sg_app -sys napoli
# O pun in freeze (adika resursa este monitorizata dar nu mai face failover in caz ca este oprita manual)
hagrp -freeze sg_app
# Verific status-ul resurselor
hastatus -sum |less
# Mutare o resursa de pa o masina pe alta
hareg -switch nume-grup-resursa -to nume_server

# Creare grup de rersurse
hagrp -add oracle-sg
hagrp -modify oracle-sg SystemList chip 0 dale 1
hagrp -modify oracle-sg AutoStartList dale
hagrp -modify oracle-sg Parallel 0
# CReare resurse in grup
hares -add ora-lsnr IP oracle-sg
hares -modify ora-lsnr Critical 1
hares -modify ora-lsnr ArpDelay 1
hares -modify ora-lsnr IfconfigTwice 0
hares -modify ora-lsnr Device
hares -modify ora-lsnr Address 10.233.184.8

# Creare disk heartbeat (pe fiecare nod pentru disk-ul respectiv)
Pe chip:
astea 2 comenzi doar pe un nod !!!
gabdiskconf -i /dev/dsk/c4t0d0s2 -s 512 -S AABB
gabdiskconf -i /dev/dsk/c4t0d0s2 -s 1024 -S BBAA
asta 2 pe fiecare din noduri !!
/sbin/gabdiskhb -a /dev/dsk/c4t0d0s2 -p a -s 512
/sbin/gabdiskhb -d /dev/dsk/c4t0d0s2 -p h -s 1024

root@chip # cat /etc/gabtab
/sbin/gabconfig -c -n2
/sbin/gabdiskhb -a /dev/dsk/c4t0d0s2 -p a -s 512
/sbin/gabdiskhb -a /dev/dsk/c4t0d0s2 -p h -s 1024

Pe dale:
/sbin/gabdiskhb -a /dev/dsk/c3t0d0s2 -p a -s 512
/sbin/gabdiskhb -a /dev/dsk/c3t0d0s2 -p h -s 1024
gabdiskhb -l (ca sa verific ca merge treaba)

root@dale # cat /etc/gabtab
/sbin/gabconfig -c -n2
/sbin/gabdiskhb -a /dev/dsk/c3t0d0s2 -p a -s 512
/sbin/gabdiskhb -a /dev/dsk/c3t0d0s2 -p h -s 1024


#As the /etc/llttab is read during LLT intialization any changes will become effective
# only after the following steps (exectute step 1 on one node, execute steps 2-6 on all nodes):

1. hastop -all -force
2. gabconfig -U
3. lltconfig -U
4. lltconfig -c
5. /usr/bin/sh /etc/gabtab
6. hastart