Oracle 12c RAC- ASM SPfile und PWD File auf eine neue Disk Gruppe verschieben

Aufgabe:

Der ASM SPfile und das AMS PWD File liegen nach einer default Installation in der +VOT Disk Group, für einen Storage Umbau sollen diese Daten aber auf Disk Group +DATA abgelegt werden.

Achtung! Ein Verlust des ASM SPFile führt zu erheblichen Problem beim nächsten Restart! siehe ⇒ Oracle 12c / 11g RAC - Backup und Recovery Überlegungen

Umgebung analysieren

Wo liegt das SPFile?

Abfragen mit „asmcmd spget“

asmcmd spget
 
asmcmd spget
+VOT/racdbcluster/ASMPARAMETERFILE/registry.253.922678557

SPFile Sichern

Sicherungskopie erstellen, falls es schief geht:

sqlplus / AS sysasm
 
SHOW parameter spfile
 
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
spfile                               string                            +VOT/racdbcluster/ASMPARAMETER
                                                                       FILE/registry.253.922678557
 
CREATE pfile='/tmp/asm_init.ora' FROM spfile;
 
File created.
 
exit
 
vi /tmp/asm_init.ora
 
#prüfen ob alles da ist!

SPFile umziehen

SPFile neu auf eine anderen Disk Gruppe erzeugen:

CREATE spfile='+DATA' FROM memory;
 
File created.
 
exist

In Alert Log prüfen, ob die Datei hinterlegt wurde:

adrci
show alert
 
2016-09-16 04:00:55.595000 +02:00
NOTE: updated gpnp profile ASM diskstring: /dev/oracleasm/disks/*,/opt/oracle/VOTNFSDISK/vote_nfs_disk01
NOTE: updated gpnp profile ASM SPFILE to +DATA/racdbcluster/ASMPARAMETERFILE/registry.253.922680055

Prüfen ob die Datei auch da ist:

asmcmd
 
ASMCMD> ls -l +DATA/racdbcluster/ASMPARAMETERFILE/registry.253.922680055
Type              Redund  Striped  Time             Sys  Name
ASMPARAMETERFILE  MIRROR  COARSE   SEP 16 04:00:00  Y    registry.253.922680055

!OK

Ängstliche können auch zuvor mal prüfen, was da überhaupt drin steht:

CREATE pfile='/tmp/testinit.ora' FROM spfile='+DATA/racdbcluster/ASMPARAMETERFILE/registry.253.922680055';
 
vi /tmp/testinit.ora
 
# prüfen ob der Parameter .asm_diskgroups= und .asm_diskstring= passen!

Prüfen ob das so schon in der Konfiguration hinterlegt ist:

gpnptool  getpval -asm_spf -p=$ORACLE_HOME/gpnp/racdb01/profiles/peer/profile.xml
 
Warning: some command line parameters were defaulted. Resulting command line:
         /opt/12.1.0.2/grid/bin/gpnptool.bin getpval -asm_spf -p=/opt/12.1.0.2/grid/gpnp/racdb01/profiles/peer/profile.xml -o-
 
+DATA/racdbcluster/ASMPARAMETERFILE/registry.253.922680055

hier ist das bereits richtig hinterlegt.


PWD File verlegen

Prüfen ob das so schon in der Konfiguration hinterlegt ist:

srvctl config asm
 
ASM home: <CRS home>
Password file: +VOT/orapwASM
ASM listener: LISTENER

Datei auch auf + DATA kopieren

asmcmd
cd VOT
ls
 
 
ASMCMD> cp orapwasm +DATA/orapwasm
 
copying +VOT/orapwasm -> +DATA/orapwasm
 
 
#Fehler
copying +VOT/orapwasm -> +DATA/orapwasm
ASMCMD-8016: copy source '+VOT/orapwasm' and target '+DATA/orapwasm' failed
ORA-19505: failed to identify file "+DATA/orapwasm"
ORA-17502: ksfdcre:4 Failed to create file +DATA/orapwasm
ORA-15056: additional error message
ORA-15221: ASM operation requires compatible.asm of 12.1.0.0.0 or higher
 
=> Compatible Parameter für ASM auf "alter DISKGROUP DATA SET ATTRIBUTE 'compatible.asm'='12.1.0.0.0'" für diese Diskgruppe setzen!

Umkonfigurieren:

#anpassen
srvctl modify asm -pwfile +DATA/orapwasm
 
# config auslesen
srvctl config asm
 
ASM home: <CRS home>
Password file: +DATA/orapwasm
ASM listener: LISTENER

Auf zweiten Knoten prüfen ob dort in der ASM Umgebung auch alles richtig konfiguriert ist!


Cluster neu starten

Beide Cluster Knoten neu starten

#auf beiden Server zugleich
reboot 

Danach testen:

SHOW parameter spfile
 
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
spfile                               string                            +DATA/racdbcluster/ASMPARAMETE
                                                                       RFILE/registry.253.922680055

Altes Passwordfile löschen:

asmcmd
 
ASMCMD> cd VOT
ASMCMD> rm orapwasm

Quellen

gpnptool