DB2
De TwisterWiki
Crée un cluster TSA
- En tant que root
[root@noeud1 ~]# preprpnode noeud 1 nooeu2
une connection en ssh est testée entre les 2 noeuds
- En tant que root
[root@noeud1 ~]# su - $INSTANCE_OWNER
[root@instance_owner ~]# db2start "Démarre l'instance"
[root@instance_owner ~]#db2haicu "Commande d'administration du cluster TSA"
[root@noeud1 ~]# lsrpdomain "liste les domaines RSCT"
- En root
[root@noeud1 ~]# lssam "affiche l'etat du cluster"
Supprimer un cluster TSA
- Il faut en premier passer le cluster ou ressource groupe offline
[root@noeud1 ~]# chrg -o offline db2_db2inst1_0-rg
[root@noeud1 ~]# lssam
Offline IBM.ResourceGroup:db2_db2inst1_0-rg Nominal=Offline
|- Offline IBM.Application:db2_db2inst1_0-rs
|- Offline IBM.Application:db2_db2inst1_0-rs:noeud1
'- Offline IBM.Application:db2_db2inst1_0-rs:noeud2
|- Offline IBM.Application:db2mnt-db2data-rs
|- Offline IBM.Application:db2mnt-db2data-rs:noeud1
'- Offline IBM.Application:db2mnt-db2data-rs:noeud2
|- Offline IBM.Application:db2mnt-db2indextext-rs
|- Offline IBM.Application:db2mnt-db2indextext-rs:noeud1
'- Offline IBM.Application:db2mnt-db2indextext-rs:noeud2
|- Offline IBM.Application:db2mnt-db2instance-rs
|- Offline IBM.Application:db2mnt-db2instance-rs:noeud1
'- Offline IBM.Application:db2mnt-db2instance-rs:noeud2
|- Offline IBM.Application:db2text-db2inst1-rs
|- Offline IBM.Application:db2text-db2inst1-rs:noeud1
'- Offline IBM.Application:db2text-db2inst1-rs:noeud2
|- Offline IBM.ServiceIP:db2ip_192_168_0_1-rs
|- Offline IBM.ServiceIP:db2ip_192_168_0_93-rs:noeud1
'- Offline IBM.ServiceIP:db2ip_192_168_0_93-rs:noeud2
'- Offline IBM.ServiceIP:db2ip_192_168_10_60-rs
|- Offline IBM.ServiceIP:db2ip_192_168_10_60-rs:noeud1
'- Offline IBM.ServiceIP:db2ip_192_168_10_60-rs:noeud2
Online IBM.Equivalency:db2_db2inst1_0-rg_group-equ
|- Online IBM.PeerNode:noeud1:noeud1
'- Online IBM.PeerNode:noeud2:noeud2
Online IBM.Equivalency:db2_private_network_0
|- Online IBM.NetworkInterface:eth2:noeud2
'- Online IBM.NetworkInterface:eth2:noeud1
Online IBM.Equivalency:db2_private_network_1
|- Online IBM.NetworkInterface:eth1:noeud1
'- Online IBM.NetworkInterface:eth1:noeud2
- On stop le cluster
[root@noeud1 ~]# stoprpdomain db2cluster
[root@noeud1 ~]# lssam
lssam: No resource groups defined or cluster is offline!
- On supprime la configuration (il faut que les montages /db2instance, /db2data et /db2indextext soient actif)
[root@noeud1 ~]# su - db2inst1
[root@instance_owner ~]# db2haicu -delete
- On vérifie si le domain est bien supprimé sur les 2 noeuds, ici il n'est pas supprimé
[root@noeud1 ~]# lsrpdomain
Name OpState RSCTActiveVersion MixedVersions TSPort GSPort
db2cluster Offline 3.1.4.3 No 12347 12348
- Suppression du domain sur les 2 noeuds
[root@noeud1 ~]# rmrpdomain -f db2cluster
Comandes utilies
- Reset l'état d'un application
ex : |- Online IBM.Application:db2text-$INSTANCE-rs Control=MemberInProblemState
|- Failed offline IBM.Application:db2text-padpdb2-rs:noeud1
'- Online IBM.Application:db2text-$INSTANCE-rs:noeud2
[root@noeud1 ~]# resetrsrc -s "Name like 'db2text%'" IBM.Application
- Changer le cluster de noeud
[root@noeud1 ~]# rgreq -o move $RESSOURCEGROUP
- stopper un ressource group
[root@noeud1 ~]# chrg -o online $RESSOURCEGROUP
- relancer un ressource group
[root@noeud1 ~]# chrg -o offline $RESSOURCEGROUP
- suspendre le cluster (état : SuspendedPropagated)
[root@noeud1 ~]# su - $instance_owner
[root@instance_owner ~]# db2haicu -disable