« DB2 » : différence entre les versions

De TwisterWiki
Aucun résumé des modifications
 
(6 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
== Crée un cluster TSA ==
== Crée un cluster TSA ==
* En tant que root
<source lang="bash">
[root@noeud1 ~]# preprpnode noeud 1 nooeu2
</source>
une connection en ssh est testée entre les 2 noeuds
* En tant que root
<source lang="bash">
[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"
</source>
* En root
<source lang="bash">
[root@noeud1 ~]# lssam "affiche l'etat du cluster"
</source>


== Supprimer un cluster TSA ==
== Supprimer un cluster TSA ==
Ligne 5 : Ligne 24 :


<source lang="bash">
<source lang="bash">
  chrg -o offline db2_db2inst1_0-rg
  [root@noeud1 ~]# chrg -o offline db2_db2inst1_0-rg
</source>


  [root@noeud1 ~]# lssam
  [root@noeud1 ~]# lssam
Ligne 40 : Ligne 58 :
         |- Online IBM.NetworkInterface:eth1:noeud1
         |- Online IBM.NetworkInterface:eth1:noeud1
         '- Online IBM.NetworkInterface:eth1:noeud2
         '- Online IBM.NetworkInterface:eth1:noeud2
</source>


* On stop le cluster
* On stop le cluster
  stoprpdomain db2cluster
<source lang="bash">
  [root@noeud1 ~]# stoprpdomain db2cluster
   
   
  [root@noeud1 ~]# lssam
  [root@noeud1 ~]# lssam
  lssam: No resource groups defined or cluster is offline!
  lssam: No resource groups defined or cluster is offline!


</source>
* On supprime la configuration (il faut que les montages /db2instance, /db2data et /db2indextext soient actif)
* On supprime la configuration (il faut que les montages /db2instance, /db2data et /db2indextext soient actif)
su - db2inst1
<source lang="bash">
db2haicu -delete
[root@noeud1 ~]# su - db2inst1
[root@instance_owner ~]# db2haicu -delete
</source>


* On vérifie si le domain est bien supprimé sur les 2 noeuds, ici il n'est pas supprimé
* On vérifie si le domain est bien supprimé sur les 2 noeuds, ici il n'est pas supprimé
<source lang="bash">
  [root@noeud1 ~]# lsrpdomain
  [root@noeud1 ~]# lsrpdomain
  Name          OpState RSCTActiveVersion MixedVersions TSPort GSPort
  Name          OpState RSCTActiveVersion MixedVersions TSPort GSPort
  db2cluster Offline 3.1.4.3          No            12347  12348
  db2cluster Offline 3.1.4.3          No            12347  12348
</source>


* Suppression du domain sur les 2 noeuds
* Suppression du domain sur les 2 noeuds
  rmrpdomain -f db2cluster
<source lang="bash">
 
[root@noeud1 ~]# rmrpdomain -f db2cluster
 
</source>
 
 
 
 
en root
 
chrg -o offline db2_db2inst1_0-rg
 
chrg -o online db2_db2inst1_0-rg
 
stoprpdomain db2clu
 
startrpdomain db2clu
 
lssam
 
 
creation cluster
 
en root
 
preprpnode noeud 1 nooeu2
  un connection en ssh est testée
 
en db2inst1
 
db2start
 
db2haicu
 
lsrpdomain
 
rmrpdomain  -f manpodb2clupp
 
 
 
 


== Comandes utilies ==
== Comandes utilies ==
Ligne 108 : Ligne 96 :


<source lang="bash">
<source lang="bash">
resetrsrc -s "Name like 'db2text%'" IBM.Application
[root@noeud1 ~]# resetrsrc -s "Name like 'db2text%'" IBM.Application
</source>
</source>


* Changer le cluster de noeud
* Changer le cluster de noeud
<source lang="bash">
<source lang="bash">
rgreq -o move $RESSOURCEGROUP
[root@noeud1 ~]# rgreq -o move $RESSOURCEGROUP
</source>
</source>


* stopper un ressource group
* stopper un ressource group
<source lang="bash">
<source lang="bash">
chrg -o online $RESSOURCEGROUP
[root@noeud1 ~]# chrg -o online $RESSOURCEGROUP
</source>
</source>


*relancer un ressource group
*relancer un ressource group
<source lang="bash">
<source lang="bash">
chrg -o offline $RESSOURCEGROUP
[root@noeud1 ~]# chrg -o offline $RESSOURCEGROUP
</source>
</source>


* suspendre le cluster (état : SuspendedPropagated)
* suspendre le cluster (état : SuspendedPropagated)
<source lang="bash">
<source lang="bash">
su - $instance_owner
[root@noeud1 ~]# su - $instance_owner
db2haicu -disable
[root@instance_owner ~]# db2haicu -disable
</source>
</source>

Dernière version du 16 février 2015 à 17:20

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