Procedimento de Ajuste do Grid para Atualização do Sistema Operacional - Oracle Linux 7 para Oracle Linux 8


Neste artigo é abordado o processo necessário a ser executado para que seja possível atualizar o Sistema Operacional Oracle Linux com o Oracle Restart

O procedimento será realizado em um ambiente com Oracle Linux 7, com o Oracle Grid 19c e Database 12.2, onde será atualizado o SO para o Oracle Linux 8. Vale destacar que o primeiro passo antes de atualizar o SO é validar se a versão para a qual será atualizada é compatível com o Oracle Restart e Oracle Database instalados.

Antes de iniciar o processo de atualização do SO é necessário desabilitar e parar e desabilitar os serviços do grid, para que eles não iniciem quando o servidor reiniciar. Para isso deve-se conectar com o usuário root e executar os comandos abaixo.

--Desabilitando os serviços do Grid
# cd Grid_home/bin
# ./crsctl disable has

--Parando os serviços do Grid
# ./crsctl stop has

--Validando o  status do serviços (que devem estar parados)
# ./crsctl check has

[oracle@srvlamim01:cdbhmg ~]$ sudo su -
Last login: Thu May 18 09:18:22 -03 2023 from spdwvifr008.marfrig-ad.local on pts/0
[root@srvlamim01 ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /orabin01/app/grid
[root@srvlamim01 ~]# cd $ORACLE_HOME/bin
[root@srvlamim01 bin]# ./crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.
[root@srvlamim01 bin]#
[root@srvlamim01 bin]# ./crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'srvlamim01'
CRS-2673: Attempting to stop 'ora.evmd' on 'srvlamim01'
CRS-2673: Attempting to stop 'ora.cdbhmga.db' on 'srvlamim01'
CRS-2673: Attempting to stop 'ora.cdbhmg.db' on 'srvlamim01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'srvlamim01'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'srvlamim01' succeeded
CRS-2677: Stop of 'ora.evmd' on 'srvlamim01' succeeded
CRS-2677: Stop of 'ora.cdbhmg.db' on 'srvlamim01' succeeded
CRS-2677: Stop of 'ora.cdbhmga.db' on 'srvlamim01' succeeded
CRS-2673: Attempting to stop 'ora.DGDATA.dg' on 'srvlamim01'
CRS-2673: Attempting to stop 'ora.DGRECO.dg' on 'srvlamim01'
CRS-2677: Stop of 'ora.DGDATA.dg' on 'srvlamim01' succeeded
CRS-2677: Stop of 'ora.DGRECO.dg' on 'srvlamim01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'srvlamim01'
CRS-2677: Stop of 'ora.asm' on 'srvlamim01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'srvlamim01'
CRS-2677: Stop of 'ora.cssd' on 'srvlamim01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'srvlamim01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@srvlamim01 bin]#
[root@srvlamim01 bin]# ./crsctl check has
CRS-4639: Could not contact Oracle High Availability Services
[root@srvlamim01 bin]#
[root@srvlamim01 bin]# ps -ef | grep pmon
root     25956 24063  0 09:45 pts/2    00:00:00 grep --color=auto pmon
[root@srvlamim01 bin]#
[root@srvlamim01 bin]#

Concluída a etapa acima, pode ser realizado o processo de upgrade do Sistema Operacional.

Ao término do processo de Upgrade do Sistema Operacional, deve realizar um restart do servidor. Feito isso, podemos seguir com o processo de atualização das bibliotecas do Oracle (relink) e o lock do grid.

--Atualização das bibliotecas (relink)
# cd Grid_home/rdbms/install/ 
# ./rootadd_rdbms.sh

--Gerar o lock do Grid
# cd Grid_home/crs/install
# roothas.sh -lock 

Agora basta ativar novamente a inicialização automática dos serviços do grid, iniciar os serviços e validar o status do serviços.

--Habilitar a inicialização automatica dos serviços do grid
# cd Grid_home/bin
# ./crsctl enable has

--Iniciar os serviços do grid
# ./crsctl start has

--Validar os serviços
# ./crsctl stat res -t

[root@srvlamim01 ~]#
[root@srvlamim01 ~]# shutdown -r now
[oracle@srvlamim01:cdbhmg ~]$
[oracle@srvlamim01:cdbhmg ~]$ sudo su -
Last login: Thu May 18 11:49:28 -03 2023 on pts/2
[root@srvlamim01 ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /orabin01/app/grid
[root@srvlamim01 ~]# cd $ORACLE_HOME/rdbms/install/
[root@srvlamim01 install]#
[root@srvlamim01 install]# ./rootadd_rdbms.sh
[root@srvlamim01 install]#
[root@srvlamim01 install]# cd $ORACLE_HOME/crs/install/
[root@srvlamim01 install]#
[root@srvlamim01 install]#
[root@srvlamim01 install]# ./roothas.sh -lock
Using configuration parameter file: /orabin01/app/19.3/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /orabin01/app/grid/crsdata/srvlamim01/crsconfig/halock__2023-05-18_11-53-09AM.log
2023/05/18 11:53:14 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
[root@srvlamim01 install]# cd $ORACLE_HOME/bin
[root@srvlamim01 bin]# ./crsctl enable has
CRS-4622: Oracle High Availability Services autostart is enabled.
[root@srvlamim01 bin]#
[root@srvlamim01 bin]# ./crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[root@srvlamim01 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DGDATA.dg
               ONLINE  ONLINE       srvlamim01          STABLE
ora.DGRECO.dg
               ONLINE  ONLINE       srvlamim01          STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       srvlamim01          STABLE
ora.asm
               ONLINE  ONLINE       srvlamim01          Started,STABLE
ora.ons
               OFFLINE OFFLINE      srvlamim01          STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cdbhmg.db
      1        ONLINE  ONLINE       srvlamim01          Open,HOME=/orabin01/
                                                             app/oracle/product/1
                                                             2.2/dbhome_1,STABLE
ora.cdbtsts.db
      1        ONLINE  ONLINE       srvlamim01          Open,HOME=/orabin01/
                                                             app/oracle/product/1
                                                             2.2/dbhome_1,STABLE
ora.cssd
      1        ONLINE  ONLINE       srvlamim01          STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       srvlamim01          STABLE
--------------------------------------------------------------------------------
[root@srvlamim01 bin]#

https://docs.oracle.com/en/database/oracle/oracle-database/19/upgor/upgrading-os-on-an-oracle-restart-server.html#GUID-E169205F-3E34-49AC-A232-03055F147F14

Comentários