Deconfigure/Reconfigure GI/ASM/OHAS after Host Name/IP Change.

GI, ASM, Listener and Database will be down after changing Host Name and/or IP address. Will get an error when starting ASM or trying to query the Disk Group. At this point, we have to deconfigure the GI on the new machine with the different host name.

Below are the mandatory steps that need to be executed after the hostname and/or IP address was updated/changed/modified.

Reference: How to change Host name / IP for a Grid Infrastructure Oracle Restart Standalone Configuration (SIHA) (Doc ID 1552810.1)

Note: CRS processes in the RAC installation is not installed for the single instance installations.For the single instance installations, there is the HAS processes stands for “High Availability Services” and covers the cssd and diskmon processes.

For the example below, it will be for Single Instance.

1) Configure the CSS & OHAS services as root user as follows:

Source the ENV File.

[oracle@usdbvmsvr115~]$ . grid.env

Deconfigure the GI on the new machine as Root or Sudo

[oracle@usdbvmsvr115~]$ sudo /grid/11.2.0/grid/crs/install/roothas.pl -deconfig –force

Using configuration parameter file: /grid/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CLSU-00100: Operating System function: opendir failed with error data: 2
CLSU-00101: Operating System error message: No such file or directory
CLSU-00103: error location: scrsearch1
CLSU-00104: additional error information: cant open scr home dir scls_scr_getval
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Successfully deconfigured Oracle Restart stack

To configure the GI new you have to do the following steps as Root or Sudo

[oracle@usdbvmsvr115~]$ sudo /grid/11.2.0/grid/crs/install/roothas.pl

Using configuration parameter file: /grid/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user ‘oracle’, privgrp ‘oinstall’..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
CRS-4664: Node usdbvmsvr115successfully pinned.
Adding Clusterware entries to upstart
usdbvmsvr115    2015/11/19 10:38:54     /grid/11.2.0/grid/cdata/usdbvmsvr115/backup_20151119_103854.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server

2) Please perform the next steps as oracle or grid OS user (as the Grid Infrastructure OS owner):

[oracle@usdbvmsvr115~]$ $ORACLE_HOME/bin/crsctl modify resource “ora.cssd” -attr “AUTO_START=1”

3) Restart the OHAS stack as grid or oracle OS user (as the Grid Infrastructure OS owner):

[oracle@usdbvmsvr115~]$ /grid/11.2.0/grid/bin/crsctl stop has

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘usdbvmsvr115’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘usdbvmsvr115’
CRS-2677: Stop of ‘ora.evmd’ on ‘usdbvmsvr115’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘usdbvmsvr115’ has completed
CRS-4133: Oracle High Availability Services has been stopped.

[oracle@usdbvmsvr115~]$ /grid/11.2.0/grid/bin/crsctl start has

CRS-4123: Oracle High Availability Services has been started.

4) Check the CSS & OHAS state as grid or oracle OS user (as the Grid Infrastructure OS owner):

[oracle@usdbvmsvr115~]$ /grid/11.2.0/grid/bin/crsctl check has

CRS-4638: Oracle High Availability Services is online
[oracle@usdbvmsvr115~]$ /grid/11.2.0/grid/bin/crsctl check css
CRS-4529: Cluster Synchronization Services is online
[oracle@usdbvmsvr115~]$ $ORACLE_HOME/bin/crsctl stat res -t
——————————————————————————–
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.ons
OFFLINE OFFLINE      usdbvmsvr115
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1        ONLINE  ONLINE       usdbvmsvr115
ora.diskmon
1        OFFLINE OFFLINE
ora.evmd
1        ONLINE  ONLINE       usdbvmsvr115

[oracle@usdbvmsvr115~]$ $ORACLE_HOME/bin/crsctl stat resource

NAME=ora.cssd
TYPE=ora.cssd.type
TARGET=ONLINE
STATE=ONLINE on usdbvmsvr115
NAME=ora.diskmon
TYPE=ora.diskmon.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.evmd
TYPE=ora.evm.type
TARGET=ONLINE
STATE=ONLINE on usdbvmsvr115
NAME=ora.ons
TYPE=ora.ons.type
TARGET=OFFLINE
STATE=OFFLINE

[oracle@usdbvmsvr115~]$ $ORACLE_HOME/bin/crsctl stat res -t

——————————————————————————–
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.ons
OFFLINE OFFLINE      usdbvmsvr115
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1        ONLINE  ONLINE       usdbvmsvr115
ora.diskmon
1        OFFLINE OFFLINE
ora.evmd
1        ONLINE  ONLINE       usdbvmsvr115

Note: If the CSS & OHAS service did NOT start, then you will need to reboot the Linux/unix box and check them again.

5) Recreate the default listener (LISTENER) using port 1521 (or using your desired port), thru the NETCA GUI located on the new Grid Infrastructure Oracle Home (or manually if you do not have graphical access) as grid or oracle OS user (as the Grid Infrastructure OS owner):

[oracle@usdbvmsvr115~]$ srvctl add listener
[oracle@usdbvmsvr115~]$ srvctl start listener

6) Please create the init+ASM.ora file on the <11.2 Grid Infrastructure Oracle Home>/dbs directory with the next parameters:

Already had the init file…no changes were made. This step can be skipped for ASM to choose the default init file.

[oracle@usdbvmsvr115dbs]$ more init+ASM.ora
+ASM.__oracle_base=’/grid/11.2.0’#ORACLE_BASE set from environment
+ASM.asm_diskgroups=’EBSPRDDG_ASM’
*.asm_diskgroups=’EBSPRDDG_ASM’
*.asm_power_limit=4
*.diagnostic_dest=’/grid/11.2.0/grid’
*.instance_type=’asm’
*.large_pool_size=400M
#*.local_listener=’LISTENER’
*.processes=400
*.remote_login_passwordfile=’SHARED’
*.shared_pool_size=450M

7) Add the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner):

[oracle@usdbvmsvr115dbs]$ /grid/11.2.0/grid/bin/srvctl add asm

8) Enable ASM instance Auto Start as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

[oracle@usdbvmsvr115dbs]$ /grid/11.2.0/grid/bin/crsctl modify resource “ora.asm” -attr “AUTO_START=1”

9) Make sure the disks are discovered by kfod as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

$> <11.2 Grid Infrastructure Oracle Home>/bin/kfod asm_diskstring='<full path ASM disks location>/*’ disks=all

OR

[oracle@usdbvmsvr115dbs]$ /grid/11.2.0/grid/bin/kfod asm_diskstring=’ORCL:*’ disks=all

——————————————————————————–
Disk          Size Path                                     User     Group
================================================================================
1:     524308 Mb ORCL:EBSPRDDATA01                        <unknown> <unknown>
2:     524308 Mb ORCL:EBSPRDDATA02                        <unknown> unknown>
3:     524308 Mb ORCL:EBSPRDDATA03                        <unknown> unknown>
4:     524308 Mb ORCL:EBSPRDDATA04                        <unknown> unknown>
5:     524308 Mb ORCL:EBSPRDDATA05                        <unknown> unknown>
KFOD-00313: No ASM instances available. CSS group services were successfully initilized by kgxgncin

10) If so, then startup the ASM instance as grid or oracle OS user (as the Grid Infrastructure OS owner) as follow:

[oracle@usdbvmsvr115dbs]$ export ORACLE_SID=+ASM
[oracle@usdbvmsvr115dbs]$ sqlplus ” /as sysasm”

SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 19 10:00:13 2015
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup pfile=init+ASM.ora
ASM instance started
Total System Global Area 1002127360 bytes
Fixed Size                  2234560 bytes
Variable Size             974726976 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL>

SQL> show parameter asm

NAME                                 TYPE        VALUE
———————————— ———– ——————————
asm_diskgroups                       string      EBSPRDDG_ASM
asm_diskstring                       string
asm_power_limit                      integer     4
asm_preferred_read_failure_groups    string
SQL>

11) Validate that the candidate disks are being discovered:

SQL> select  path  from v$asm_disk;

PATH
——————————————————————————–
ORCL:EBSPRDDATA01
ORCL:EBSPRDDATA02
ORCL:EBSPRDDATA03
ORCL:EBSPRDDATA04
ORCL:EBSPRDDATA05

12) Create a new ASM instance spfile:

SQL> create spfile from pfile;
File created.

13) Add the new ASM spfile and listener to the new ASM instance resource:

[oracle@usdbvmsvr115dbs]$ /grid/11.2.0/grid/bin/srvctl modify asm -l LISTENER

14) Validate the OHAS

[oracle@usdbvmsvr115dbs]$ crs_stat -t

Name           Type           Target    State     Host
————————————————————
ora…._ASM.dg ora….up.type ONLINE    ONLINE    usdbvmsvr115
ora….ER.lsnr ora….er.type ONLINE    ONLINE    usdbvmsvr115
ora.asm        ora.asm.type   ONLINE    ONLINE    usdbvmsvr115
ora.cssd       ora.cssd.type  ONLINE    ONLINE    usdbvmsvr115
ora.diskmon    ora….on.type OFFLINE   OFFLINE
ora.evmd       ora.evm.type   ONLINE    ONLINE    usdbvmsvr115
ora.ons        ora.ons.type   OFFLINE   OFFLINE

[oracle@usdbvmsvr115dbs]$ asmcmd lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576   2621540   808716                0          808716              0             N  EBSPRDDG_ASM/

Now the ASM is up and Disk Group is mounted. Proceed to start up of the Database,

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s