User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

This article will show how to remove a node from a Oracle Grid Infrastructure 12cR2 cluster.

Before starting, you'll need
- Oracle Grid Infrastructure 12cR2 for RAC already installed
  (if not, check how to install Oracle Grid Infrastructure 12cR2 for RAC)
- At least two nodes on this cluster
  (if not, check how to Add a Node to a cluster Oracle 12cR2 RAC)
- root access to all nodes

In this scenario, oralab02 will be the node to remove from the Oracle GI 12R2 cluster.

Remove instance from a Node

It is recommanded to remove all instances from the node you want to remove first.

On oralab01 server as oracle user :

# List cluster database instances
[oracle@oralab01]$ srvctl status database -thishome
Database unique name: UXOCDBRAC
Instance UXOCDB1 is running on node oralab01
Instance UXOCDB2 is running on node oralab02

# Remove instance UXOCDB2 from oralab02 
[oracle@oralab01]$ dbca -silent -deleteInstance -gdbName UXOCDBRAC -nodeName oralab02 -instanceName UXOCDB2
    Deleting instance
    1% complete
    2% complete
    6% complete
    13% complete
    20% complete
    26% complete
    33% complete
    40% complete
    46% complete
    53% complete
    60% complete
    66% complete
    Completing instance management.

Remove a Node from a cluster

Check if unpinned

On oralab02 server as root user :

# Set grid environement
[root@oralab02]$ . oraenv
    ORACLE_SID = [root] ? +ASM2
    The Oracle base has been set to /u01/app/grid

# Check if unpinned (this cmd can be executed as grid as well)
[root@oralab02]$ olsnodes -s -t
    oralab01        Active  Unpinned
    oralab02        Active  Unpinned

# If pinned, unpin with this cmd
[root@oralab02]$ crsctl unpin css -n oralab02
    CRS-4667: Node oralab02 successfully unpinned.

Deconfigure local Oracle Clusterware

On oralab02 server as root user:

# Set grid environement
[root@oralab02]$ . oraenv
    ORACLE_SID = [root] ? +ASM2
    The Oracle base has been set to /u01/app/grid

# Deconfigure local Oracle Clusterware
[root@oralab02]$ $ORACLE_HOME/crs/install/rootcrs.pl -deconfig -deinstall -force
    Using configuration parameter file: ./crsconfig_params
    The log of current session can be found at:
      /u01/app/grid/crsdata/oralab02/crsconfig/crsdeconfig_oralab02_2017-09-06_06-01-04PM.log
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oralab02'
    CRS-2673: Attempting to stop 'ora.crsd' on 'oralab02'
    CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'oralab02'
    CRS-2673: Attempting to stop 'ora.DATA.dg' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.chad' on 'oralab02'
    CRS-2677: Stop of 'ora.DATA.dg' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.asm' on 'oralab02'
    CRS-2677: Stop of 'ora.asm' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'oralab02'
    CRS-2677: Stop of 'ora.chad' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'oralab02' succeeded
    CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oralab02' has completed
    CRS-2677: Stop of 'ora.crsd' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.asm' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.crf' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.mdnsd' on 'oralab02'
    CRS-2677: Stop of 'ora.drivers.acfs' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.crf' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.gpnpd' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.mdnsd' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.asm' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'oralab02'
    CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.ctssd' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.evmd' on 'oralab02'
    CRS-2677: Stop of 'ora.ctssd' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.evmd' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'oralab02'
    CRS-2677: Stop of 'ora.cssd' on 'oralab02' succeeded
    CRS-2673: Attempting to stop 'ora.driver.afd' on 'oralab02'
    CRS-2673: Attempting to stop 'ora.gipcd' on 'oralab02'
    CRS-2677: Stop of 'ora.driver.afd' on 'oralab02' succeeded
    CRS-2677: Stop of 'ora.gipcd' on 'oralab02' succeeded
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oralab02' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    2017/09/06 18:03:53 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
    2017/09/06 18:04:17 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
    2017/09/06 18:04:20 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

For a shared home

If you have a ACFS shared home, execute on oralab02 server as grid user:

# Detach the Grid home
[grid@oralab02]$ $ORACLE_HOME/oui/bin/runInstaller -detachHome ORACLE_HOME=$ORACLE_HOME -silent -local
    Starting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB.   Actual 9211 MB    Passed
    The inventory pointer is located at /etc/oraInst.loc
    'DetachHome' was successful.

For a local home

On oralab02 server as grid user:

# Set grid environement
[grid@oralab02]$ . oraenv
    ORACLE_SID = [root] ? +ASM2
    The Oracle base has been set to /u01/app/grid

# Update local node list
[grid@oralab02]$ $ORACLE_HOME/oui/bin/runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME CLUSTER_NODES={oralab02}. CRS=TRUE -local
    Starting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB.   Actual 9211 MB    Passed
    The inventory pointer is located at /etc/oraInst.loc
    'UpdateNodeList' was successful.

# Deinstall local Oracle Clusterware
[grid@oralab02]$ $ORACLE_HOME/deinstall/deinstall -local

    Checking for required files and bootstrapping ...
    Please wait ...
    Location of logs /tmp/deinstall2017-09-08_02-29-41AM/logs/

    ############ ORACLE DECONFIG TOOL START ############


    ######################### DECONFIG CHECK OPERATION START #########################
    ## [START] Install check configuration ##


    Checking for existence of the Oracle home location /u01/app/12.2.0/grid
    Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
    Oracle Base selected for deinstall is: /u01/app/grid
    Checking for existence of central inventory location /u01/app/oraInventory
    Checking for existence of the Oracle Grid Infrastructure home

    ## [END] Install check configuration ##

    Traces log file: /tmp/deinstall2017-09-08_02-29-41AM/logs//crsdc_2017-09-08_02-29-56-AM.log

    Network Configuration check config START

    Network de-configuration trace file location: /tmp/deinstall2017-09-08_02-29-41AM/logs/netdc_check2017-09-08_02-29-56-AM.log

    Specify all Oracle Restart enabled listeners that are to be de-configured. Enter .(dot) to deselect all. [ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN1]:

    Network Configuration check config END

    Asm Check Configuration START

    ASM de-configuration trace file location: /tmp/deinstall2017-09-08_02-29-41AM/logs/asmcadc_check2017-09-08_02-30-28-AM.log

    ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
    Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/12.2.0/grid.
    ASM Diagnostic Destination : /u01/app/grid
    ASM Diskgroups :
    ASM diskstring : /dev/sd*,AFD:*
    Diskgroups will not be dropped
     If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'. Do you  want to modify above information (y|n) [n]:
    Database Check Configuration START

    Database de-configuration trace file location: /tmp/deinstall2017-09-08_02-29-41AM/logs/databasedc_check2017-09-08_02-30-56-AM.log

    Database Check Configuration END

    ######################### DECONFIG CHECK OPERATION END #########################


    ####################### DECONFIG CHECK OPERATION SUMMARY #######################
    Oracle Grid Infrastructure Home is:
    Oracle Home selected for deinstall is: /u01/app/12.2.0/grid
    Inventory Location where the Oracle home registered is: /u01/app/oraInventory
    Following Oracle Restart enabled listener(s) will be de-configured: ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN1
    ASM instance will be de-configured from this Oracle home
    Do you want to continue (y - yes, n - no)? [n]: y
    A log of this session will be written to: '/tmp/deinstall2017-09-08_02-29-41AM/logs/deinstall_deconfig2017-09-08_02-29-54-AM.out'
    Any error messages from this session will be written to: '/tmp/deinstall2017-09-08_02-29-41AM/logs/deinstall_deconfig2017-09-08_02-29-54-AM.err'

    ######################## DECONFIG CLEAN OPERATION START ########################
    Database de-configuration trace file location: /tmp/deinstall2017-09-08_02-29-41AM/logs/databasedc_clean2017-09-08_02-31-56-AM.log
    ASM de-configuration trace file location: /tmp/deinstall2017-09-08_02-29-41AM/logs/asmcadc_clean2017-09-08_02-31-56-AM.log
    ASM Clean Configuration START
    ASM Clean Configuration END

    Network Configuration clean config START

    Network de-configuration trace file location: /tmp/deinstall2017-09-08_02-29-41AM/logs/netdc_clean2017-09-08_02-31-59-AM.log

    De-configuring Oracle Restart enabled listener(s): ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN1

    De-configuring listener: ASMNET1LSNR_ASM
        Stopping listener: ASMNET1LSNR_ASM
        Warning: Failed to stop listener. Listener may not be running.
        Deleting listener: ASMNET1LSNR_ASM
        Listener deleted successfully.
    Listener de-configured successfully.

    De-configuring listener: LISTENER
        Stopping listener: LISTENER
        Warning: Failed to stop listener. Listener may not be running.
        Deleting listener: LISTENER
        Listener deleted successfully.
    Listener de-configured successfully.

    De-configuring listener: LISTENER_SCAN1
        Stopping listener: LISTENER_SCAN1
        Warning: Failed to stop listener. Listener may not be running.
        Deleting listener: LISTENER_SCAN1
        Listener deleted successfully.
    Listener de-configured successfully.

    De-configuring Listener configuration file...
    Listener configuration file de-configured successfully.

    De-configuring Naming Methods configuration file...
    Naming Methods configuration file de-configured successfully.

    De-configuring backup files...
    Backup files de-configured successfully.

    The network configuration has been cleaned up successfully.

    Network Configuration clean config END


    ######################### DECONFIG CLEAN OPERATION END #########################


    ####################### DECONFIG CLEAN OPERATION SUMMARY #######################
    ASM instance was de-configured successfully from the Oracle home
    Following Oracle Restart enabled listener(s) were de-configured successfully: ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN1
    Oracle Restart is stopped and de-configured successfully.
    #######################################################################


    ############# ORACLE DECONFIG TOOL END #############

    Using properties file /tmp/deinstall2017-09-08_02-29-41AM/response/deinstall_2017-09-08_02-29-54-AM.rsp
    Location of logs /tmp/deinstall2017-09-08_02-29-41AM/logs/

    ############ ORACLE DEINSTALL TOOL START ############





    ####################### DEINSTALL CHECK OPERATION SUMMARY #######################
    A log of this session will be written to: '/tmp/deinstall2017-09-08_02-29-41AM/logs/deinstall_deconfig2017-09-08_02-29-54-AM.out'
    Any error messages from this session will be written to: '/tmp/deinstall2017-09-08_02-29-41AM/logs/deinstall_deconfig2017-09-08_02-29-54-AM.err'

    ######################## DEINSTALL CLEAN OPERATION START ########################
    ## [START] Preparing for Deinstall ##
    Setting LOCAL_NODE to oralab02
    Setting CRS_HOME to false
    Setting oracle.installer.invPtrLoc to /tmp/deinstall2017-09-08_02-29-41AM/oraInst.loc
    Setting oracle.installer.local to true

    ## [END] Preparing for Deinstall ##

    Setting the force flag to false
    Setting the force flag to cleanup the Oracle Base
    Oracle Universal Installer clean START

    Detach Oracle home '/u01/app/12.2.0/grid' from the central inventory on the local node : Done

    Delete directory '/u01/app/12.2.0/grid' on the local node : Done

    Delete directory '/u01/app/oraInventory' on the local node : Done

    ...
    ...
    ...

    Oracle Universal Installer cleanup was successful.

    Oracle Universal Installer clean END


    ## [START] Oracle install clean ##


    ## [END] Oracle install clean ##


    ######################### DEINSTALL CLEAN OPERATION END #########################


    ####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
    Successfully detached Oracle home '/u01/app/12.2.0/grid' from the central inventory on the local node.
    Successfully deleted directory '/u01/app/12.2.0/grid' on the local node.
    Successfully deleted directory '/u01/app/oraInventory' on the local node.
    Oracle Universal Installer cleanup was successful.


    Run 'rm -r /etc/oraInst.loc' as root on node(s) 'oralab02' at the end of the session.

    Run 'rm -r /opt/ORCLfmap' as root on node(s) 'oralab02' at the end of the session.
    Run 'rm -r /etc/oratab' as root on node(s) 'oralab02' at the end of the session.
    Review the permissions and contents of '/u01/app/grid' on nodes(s) 'oralab02'.
    If there are no Oracle home(s) associated with '/u01/app/grid', manually delete '/u01/app/grid' and its contents.
    Oracle deinstall tool successfully cleaned up temporary directories.
    #######################################################################


    ############# ORACLE DEINSTALL TOOL END #############

# Delete files as root (WARNING! Check you are on the right server)
[grid@oralab02]$ su - -c "rm -rf /etc/oraInst.loc /opt/ORCLfmap /etc/oratab /u01/app/grid"
    Password:

Delete node from all others nodes of the cluster

From any node that you are not deleting, run the following command as root to delete the node from the cluster:

 

# Set grid environement
[root@oralab01]$ . oraenv
    ORACLE_SID = [root] ? +ASM1
    The Oracle base has been set to /u01/app/grid

# Delete node on all others nodes
[root@oralab01]$ $ORACLE_HOME/bin/crsctl delete node -n oralab02
    CRS-4661: Node oralab02 successfully deleted.

Check if successful

Verify successful nodedel

[grid@oralab01]$ cluvfy stage -post nodedel -n oralab02

    Verifying Node Removal ...
      Verifying CRS Integrity ...PASSED
      Verifying Clusterware Version Consistency ...PASSED
    Verifying Node Removal ...PASSED

    Post-check for node removal was successful.

    CVU operation performed:      stage -post nodedel
    Date:                         06-Sep-2017 20:37:37
    CVU home:                     /u01/app/12.2.0/grid/
    User:                         grid

List status ressources

[grid@oralab01]$ olsnodes -s -t
    oralab01        Active  Unpinned

[grid@oralab01]$ crsctl stat res -t
    --------------------------------------------------------------------------------
    Name           Target  State        Server                   State details
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.ASMNET1LSNR_ASM.lsnr
                   ONLINE  ONLINE       oralab01                 STABLE
    ora.DATA.dg
                   ONLINE  ONLINE       oralab01                 STABLE
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       oralab01                 STABLE
    ora.chad
                   ONLINE  ONLINE       oralab01                 STABLE
    ora.net1.network
                   ONLINE  ONLINE       oralab01                 STABLE
    ora.ons
                   ONLINE  ONLINE       oralab01                 STABLE
    ora.proxy_advm
                   OFFLINE OFFLINE      oralab01                 STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.LISTENER_SCAN2.lsnr
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.LISTENER_SCAN3.lsnr
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.MGMTLSNR
          1        ONLINE  ONLINE       oralab01                 169.254.147.90 192.1
                                                                 68.10.31,STABLE
    ora.asm
          1        ONLINE  ONLINE       oralab01                 Started,STABLE
          2        ONLINE  OFFLINE                               STABLE
          3        OFFLINE OFFLINE                               STABLE
    ora.cvu
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.mgmtdb
          1        ONLINE  ONLINE       oralab01                 Open,STABLE
    ora.oralab01.vip
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.qosmserver
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.scan1.vip
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.scan2.vip
          1        ONLINE  ONLINE       oralab01                 STABLE
    ora.scan3.vip
          1        ONLINE  ONLINE       oralab01                 STABLE
    --------------------------------------------------------------------------------

Please leave comments and suggestions,
Michel.

Reference
Adding and Deleting Cluster Nodes (docs.oracle.com)
Removing Node and Adding Node from the Cluster for Oracle 12c (toadworld.com)

Enjoyed this article? Please like it or share it.

Add comment

Please connect with one of social login below (or fill up name and email)

     


Security code
Refresh