Quantcast
Viewing all articles
Browse latest Browse all 10

Restauration d’un OCR dans ASM (11GR2)

Contrairement au versions précédentes, pour la 11GR2, on a la possibilité de stocker l’OCR et les Voting Disks dans un diskgroup ASM.

Après avoir installé un cluster utilisant cette nouvelle fonctionnalité, et faisant quelques tests de recette qui comprennent notamment la restauration de l’OCR, je me suis demandé comment pouvait on restaurer l’OCR quand le cluster est arrêté et donc ASM où il est stocké ?

Attention, ce qui suit est valable uniquement pour la version 11.2.0.1, en 11.2.0.2 les choses sont un petit peu différentes

1. Arrêter le  clusterware sur chaque noeud :

crsctl stop cluster -all

2. On vérifie que les deux clusterware sont bien arrêtés sur chaque noeud

3. Sur le noeud sur lequel est présent le backup de l’OCR démarrer manuellement les ressources css et asm

[root@rac1 bin]# ./crsctl start res ora.cssd -init
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
[root@rac1 bin]# ./crsctl start res ora.asm -init
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2672: Attempting to start 'ora.ctssd' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded

4. Restaurer l’OCR depuis le backup qui nous intéresse

[root@rac1 bin]# ./ocrconfig -showbackup

rac1     2010/12/22 12:53:13     /app/product/11.2.0/grid/cdata/rac-cluster/backup00.ocr

rac1     2010/12/22 08:53:11     /app/product/11.2.0/grid/cdata/rac-cluster/backup01.ocr

rac1     2010/12/22 04:53:11     /app/product/11.2.0/grid/cdata/rac-cluster/backup02.ocr

rac1     2010/12/21 20:53:10     /app/product/11.2.0/grid/cdata/rac-cluster/day.ocr

rac1     2010/12/21 20:53:10     /app/product/11.2.0/grid/cdata/rac-cluster/week.ocr

rac1     2011/03/03 14:54:21     /app/product/11.2.0/grid/cdata/rac-cluster/backup_20110303_145421.ocr

[root@rac1 bin]# ./ocrconfig -restore /app/product/11.2.0/grid/cdata/rac-cluster/backup_20110303_145421.ocr

5. Démarrer manuellement les ressources manquantes du cluster evmd et crsd.

 [root@rac1 bin]# ./crsctl start res ora.evmd –init
CRS-2672: Attempting to start 'ora.evmd' on 'rac1'
CRS-2676: Start of 'ora.evmd' on 'rac1' succeeded
[root@rac1 bin]# ./crsctl start res ora.crsd –init
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1' succeeded

6. Démarrer le clusterware sur les autres noeuds : crsctl start cluster –all

[root@rac1 bin]# ./crsctl start cluster –all
CRS-2672: Tentative de drmarrage de 'ora.cssdmonitor' sur 'rac2'
CRS-2676: 'ora.cssdmonitor' a été démarré sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.cssd' sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.diskmon' sur 'rac2'
CRS-2676: 'ora.diskmon' a été démarré sur 'rac2'
CRS-2676: 'ora.cssd' a été démarré sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.ctssd' sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.cluster_interconnect.haip' sur 'rac2'
CRS-2676: 'ora.ctssd' a été démarré sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.evmd' sur 'rac2'
CRS-2676: 'ora.evmd' a été démarré sur 'rac2'
CRS-2676: 'ora.cluster_interconnect.haip' a été démarré sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.asm' sur 'rac2'
CRS-2676: 'ora.asm' a été démarré sur 'rac2'
CRS-2672: Tentative de démarrage de 'ora.crsd' sur 'rac2'
CRS-2676: 'ora.crsd' a été démarré sur 'rac2'
CRS-4690: Oracle Clusterware is already running on 'rac1'
CRS-4000: Command Start failed, or completed with errors

7. Vérification

 [root@rac1 bin]# ./crs_stat –t
Name           Type           Target    State     Host
ora.DGDATA.dg  ora....up.type ONLINE    ONLINE    rac1
ora.DGFRA.dg   ora....up.type ONLINE    ONLINE    rac1
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1
ora....TING.dg ora....up.type ONLINE    ONLINE    rac1
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1
ora.cvu        ora.cvu.type   ONLINE    ONLINE    rac1
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    rac1
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    rac1
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    OFFLINE   OFFLINE
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    OFFLINE   OFFLINE
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1
ora.setra.db   ora....se.type ONLINE    ONLINE    rac1

Un peu plus compliqué que dans les versions précédentes, mais ASM oblige ….


Viewing all articles
Browse latest Browse all 10