Thursday, October 22, 2020

Deleting Node from the RAC Cluster using "dbca -silent -deleteInstance" Option

Procedure to Removing Node from the Cluster:

 ·         You cannot simply remove the node from the cluster

·         Oracle central inventory on each node has information about all nodes

·         The Oracle Cluster Registry (OCR) contains information about all the nodes

Step-1: Check the status of Database Instances:

[oracle@oel72-rac1 ~]$ srvctl status database -d orcl
Instance orcl1 is running on node oel72-rac1
Instance orcl2 is running on node oel72-rac2
[oracle@oel72-rac1 ~]$

Step-2: Login to Node-1 (oel72-rac1) and execute "dbca -silent -deleteInstance" option

Note: If you execute from Node-2 (oel72-rac2), you will get the following error.

[oracle@oel72-rac2 ~]$ dbca -silent -deleteInstance -nodeList oel72-rac2 -gdbName orcl -instanceName orcl2 -sysDBAUserName sys -sysDBAPassword oracle

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl.log" for further details.

[oracle@oel72-rac2 ~]$ cat /u01/app/oracle/cfgtoollogs/dbca/orcl.log

The instance "orcl2" is a local instance. You cannot delete the local instance. Please try this operation from another node in the cluster

[oracle@oel72-rac2 ~]$

Note: We can "Instance Management" option from DBCA and followed by "Delete Instance" option.

[oracle@oel72-rac1 ~]$ . oraenv

ORACLE_SID = [orcl1] ? orcl1

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ cd $ORACLE_HOME

[oracle@oel72-rac1 db_1]$ cd bin

[oracle@oel72-rac1 bin]$ ls -lrth dbca*

-rwxr-xr-x. 1 oracle oinstall 6.2K Jul 16 01:53 dbca

[oracle@oel72-rac1 bin]$

[oracle@oel72-rac1 bin]$ dbca -silent -deleteInstance -nodeList oel72-rac2 -gdbName orcl -instanceName orcl2 -sysDBAUserName sys -sysDBAPassword oracle

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.

100% complete

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl.log" for further details.

[oracle@oel72-rac1 bin]$

[oracle@oel72-rac1 bin]$ cat /u01/app/oracle/cfgtoollogs/dbca/orcl.log

The Database Configuration Assistant will delete the Oracle instance and its associated OFA directory structure. All information about this instance will be deleted.

Services associated with this instance will be modified as follows:

Services [ orclsvc1 ] will be updated by removing this instance from the services.

Do you want to proceed?

Deleting instance

DBCA_PROGRESS : 1%

DBCA_PROGRESS : 2%

DBCA_PROGRESS : 6%

DBCA_PROGRESS : 13%

DBCA_PROGRESS : 20%

DBCA_PROGRESS : 26%

DBCA_PROGRESS : 33%

DBCA_PROGRESS : 40%

DBCA_PROGRESS : 46%

DBCA_PROGRESS : 53%

DBCA_PROGRESS : 60%

DBCA_PROGRESS : 66%

Completing instance management.

DBCA_PROGRESS : 100%

Instance "orcl2" deleted successfully from node "oel72-rac2".

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ srvctl status database -d orcl

Instance orcl1 is running on node oel72-rac1

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ srvctl config database -d orcl

Database unique name: orcl

Database name: orcl

Oracle home: /u01/app/oracle/product/12.1.0.2/db_1

Oracle user: oracle

Spfile: +DATADG/ORCL/PARAMETERFILE/spfile.274.1045907699

Password file: +DATADG/ORCL/PASSWORD/pwdorcl.256.1045907323

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools:

Disk Groups: DATADG

Mount point paths:

Services: orclsvc1

Type: RAC

Start concurrency:

Stop concurrency:

OSDBA group: dba

OSOPER group: oper

Database instances: orcl1

Configured nodes: oel72-rac1

Database is administrator managed

[oracle@oel72-rac1 ~]$

Step-4: Login to Node-2 (oel72-rac2) and disable the listener and stop the listener.

[oracle@oel72-rac2 ~]$ cd $ORACLE_HOME/oui/bin

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ pwd

/u01/app/oracle/product/12.1.0.2/db_1/oui/bin

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ srvctl status listener -l LISTENER

Listener LISTENER is enabled

Listener LISTENER is running on node(s): oel72-rac2,oel72-rac1

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ srvctl disable listener -l LISTENER

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ srvctl status listener -l LISTENER

Listener LISTENER is disabled

Listener LISTENER is running on node(s): oel72-rac2,oel72-rac1

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ srvctl stop listener -l LISTENER -n oel72-rac2

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ srvctl status listener -l LISTENER

Listener LISTENER is disabled

Listener LISTENER is running on node(s): oel72-rac1

[oracle@oel72-rac2 bin]$

Step-5: Update inventory on the deleting node

[oracle@oel72-rac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1 "CLUSTER_NODES={oel72-rac2}" -local

Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 10047 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

'UpdateNodeList' was successful.

[oracle@oel72-rac2 bin]$

Step-6: Deinstalling ORACLE_HOME from Node-2 (oel72-rac2)

[oracle@oel72-rac2 ~]$ cd $ORACLE_HOME

[oracle@oel72-rac2 db_1]$ cd deinstall/

[oracle@oel72-rac2 deinstall]$

[oracle@oel72-rac2 deinstall]$ ls -lrth dein*

-rw-r--r--. 1 oracle oinstall 8.5K Jul 16 01:58 deinstall.xml

-rwxr-xr-x. 1 oracle oinstall  10K Jul 16 01:58 deinstall

-rwxr-xr-x. 1 oracle oinstall  28K Jul 16 01:58 deinstall.pl

[oracle@oel72-rac2 deinstall]$

[oracle@oel72-rac2 deinstall]$ pwd

/u01/app/oracle/product/12.1.0.2/db_1/deinstall

[oracle@oel72-rac2 deinstall]$

[oracle@oel72-rac2 deinstall]$ ./deinstall -local

Checking for required files and bootstrapping ...

Please wait ...

Location of logs /u01/app/oraInventory/logs/

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

############ DECONFIG CHECK OPERATION START #########################

## [START] Install check configuration ##

Checking for existence of the Oracle home location /u01/app/oracle/product/12.1.0.2/db_1

Oracle Home type selected for deinstall is: Oracle Real Application Cluster Database

Oracle Base selected for deinstall is: /u01/app/oracle

Checking for existence of central inventory location /u01/app/oraInventory

Checking for existence of the Oracle Grid Infrastructure home /u01/app/12.2.0/grid

The following nodes are part of this cluster: oel72-rac2,oel72-rac1

Checking for sufficient temp space availability on node(s) : 'oel72-rac2'

## [END] Install check configuration ##

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2020-10-22_04-35-25-PM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2020-10-22_04-35-29-PM.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured locally on this node for this Oracle home. Local configurations of the discovered databases will be removed [orcl2]:

Database Check Configuration END

Oracle Configuration Manager check START

OCM check log file location : /u01/app/oraInventory/logs//ocm_check8548.log

Oracle Configuration Manager check END

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

################ DECONFIG CHECK OPERATION SUMMARY #######################

Oracle Grid Infrastructure Home is: /u01/app/12.2.0/grid

The following nodes are part of this cluster: oel72-rac2,oel72-rac1

The cluster node(s) on which the Oracle home deinstallation will be performed are:oel72-rac2

Oracle Home selected for deinstall is: /u01/app/oracle/product/12.1.0.2/db_1

Inventory Location where the Oracle home registered is: /u01/app/oraInventory

The option -local will not modify any database configuration for this Oracle home.

Checking the config status for CCR

Oracle Home exists with CCR directory, but CCR is not configured

CCR check is finished

Do you want to continue (y - yes, n - no)? [n]: y

A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-22_04-35-21-PM.out'

Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-22_04-35-21-PM.err'

################### DECONFIG CLEAN OPERATION START ########################

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2020-10-22_04-37-22-PM.log

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2020-10-22_04-37-22-PM.log

Network Configuration clean config END

Oracle Configuration Manager clean START

OCM clean log file location : /u01/app/oraInventory/logs//ocm_clean8548.log

Oracle Configuration Manager clean END

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

################### DECONFIG CLEAN OPERATION SUMMARY #######################

Cleaning the config for CCR

As CCR is not configured, so skipping the cleaning of CCR configuration

CCR clean is finished

#######################################################################

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

Using properties file /tmp/deinstall2020-10-22_04-35-08PM/response/deinstall_2020-10-22_04-35-21-PM.rsp

Location of logs /u01/app/oraInventory/logs/

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

############ DEINSTALL CHECK OPERATION SUMMARY #######################

A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-22_04-35-21-PM.out'

Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-22_04-35-21-PM.err'

############### DEINSTALL CLEAN OPERATION START ########################

## [START] Preparing for Deinstall ##

Setting LOCAL_NODE to oel72-rac2

Setting CLUSTER_NODES to oel72-rac2

Setting CRS_HOME to false

Setting oracle.installer.invPtrLoc to /tmp/deinstall2020-10-22_04-35-08PM/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/oracle/product/12.1.0.2/db_1' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/product/12.1.0.2/db_1' on the local node : Done

The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/12.2.0/grid'.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END

## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2020-10-22_04-35-08PM' on node 'oel72-rac2'

## [END] Oracle install clean ##

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

################# DEINSTALL CLEAN OPERATION SUMMARY #######################

Successfully detached Oracle home '/u01/app/oracle/product/12.1.0.2/db_1' from the central inventory on the local node.

Successfully deleted directory '/u01/app/oracle/product/12.1.0.2/db_1' on the local node.

Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.

######################################################################

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

[oracle@oel72-rac2 deinstall]$

Step-7: Updating Inventory in Node-1:

[oracle@oel72-rac1 ~]$ cd $ORACLE_HOME

[oracle@oel72-rac1 db_1]$ cd oui/bin

[oracle@oel72-rac1 bin]$

[oracle@oel72-rac1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1 "CLUSTER_NODES={oel72-rac1}"

Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 10047 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

'UpdateNodeList' was successful.

[oracle@oel72-rac1 bin]$

Step-8: Login into Node-2 and do the following

[oracle@oel72-rac2 ~]$ su - root

Password:

Last login: Thu Oct 22 16:41:24 EDT 2020

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# . oraenv

ORACLE_SID = [root] ? +ASM2

ORACLE_HOME = [/home/oracle] ? /u01/app/12.2.0/grid

The Oracle base has been set to /u01/app/oracle

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# olsnodes -s -t

oel72-rac1      Active  Unpinned

oel72-rac2      Active  Unpinned

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# crsctl unpin css -n oel72-rac2

CRS-4667: Node oel72-rac2 successfully unpinned.

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# olsnodes -s -t

oel72-rac1      Active  Unpinned

oel72-rac2      Active  Unpinned

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# olsnodes -s -t

oel72-rac1      Active  Unpinned

oel72-rac2      Active  Unpinned

[root@oel72-rac2 ~]#

[root@oel72-rac2 install]# cd $ORACLE_HOME

[root@oel72-rac2 grid]#

[root@oel72-rac2 grid]# cd crs/install/

[root@oel72-rac2 install]#

[root@oel72-rac2 install]# pwd

/u01/app/12.2.0/grid/crs/install

[root@oel72-rac2 install]#

[root@oel72-rac2 install]# ./rootcrs.pl -deconfig -deinstall -force

Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . . ./../../perl/lib) at crsinstall.pm line 296.

BEGIN failed--compilation aborted at crsinstall.pm line 296.

Compilation failed in require at ./rootcrs.pl line 165.

BEGIN failed--compilation aborted at ./rootcrs.pl line 165.

[root@oel72-rac4 install]#

Note-1: Not able to execute the above command because of "perl" package

Note-2: Installed the perl package using YUM

[root@oel72-rac1 ~]# find . -name Env.pm -print

[root@oel72-rac1 ~]# yum install perl-Env

ol7_UEKR3                                       | 2.5 kB  00:00:00

Loaded plugins: langpacks, ulninfo             

ol7_latest                                      | 2.7 kB  00:00:00

(1/4): ol7_UEKR3/x86_64/updateinfo              | 118 kB  00:00:00

(2/4): ol7_latest/x86_64/updateinfo             | 3.1 MB  00:00:02

(3/4): ol7_UEKR3/x86_64/primary_db              |  67 MB  00:00:13

(4/4): ol7_latest/x86_64/primary_db             |  39 MB  00:00:17

Resolving Dependencies                         

--> Running transaction check                  

---> Package perl-Env.noarch 0:1.04-2.el7 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

========================================================================

 Package                      Arch      Version      Repository    Size

========================================================================

Installing:                                                       

 perl-Env                     noarch    1.04-2.el7   ol7_latest    15 k

Transaction Summary                                               

========================================================================

Install  1 Package          

Total download size: 15 k                      

Installed size: 27 k                           

Is this ok [y/d/N]: y                          

Downloading packages:                          

perl-Env-1.04-2.el7.noarch.rpm                  |  15 kB  00:00:01

Running transaction check                      

Running transaction test                       

Transaction test succeeded                     

Running transaction                            

Warning: RPMDB altered outside of yum.          

  Installing : perl-Env-1.04-2.el7.noarch       1/1

  Verifying  : perl-Env-1.04-2.el7.noarch       1/1

Installed:                                     

  perl-Env.noarch 0:1.04-2.el7                  

Complete!                                      

[root@oel72-rac1 ~]#                           

[root@oel72-rac2 install]# ./rootcrs.pl -deconfig -deinstall -force

Using configuration parameter file: ./crsconfig_params

The log of current session can be found at:

  /u01/app/oracle/crsdata/oel72-rac2/crsconfig/crsdeconfig_oel72-rac2_2020-10-22_04-47-52PM.log

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.crsd' on 'oel72-rac2'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.acfsdg.acfs_gg.acfs' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.OCRVD.dg' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.chad' on 'oel72-rac2'

CRS-2677: Stop of 'ora.OCRVD.dg' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.ACFSDG.dg' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'oel72-rac2'

CRS-2677: Stop of 'ora.ACFSDG.dg' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.DATADG.dg' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'oel72-rac2'

CRS-2677: Stop of 'ora.acfsdg.acfs_gg.acfs' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.ACFSDG.ACFS_GG.advm' on 'oel72-rac2'

CRS-2677: Stop of 'ora.ACFSDG.ACFS_GG.advm' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.proxy_advm' on 'oel72-rac2'

CRS-2677: Stop of 'ora.asm' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'oel72-rac2'

CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.proxy_advm' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.chad' on 'oel72-rac2' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'oel72-rac2' has completed

CRS-2677: Stop of 'ora.crsd' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.storage' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.crf' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.gpnpd' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.mdnsd' on 'oel72-rac2'

CRS-2677: Stop of 'ora.drivers.acfs' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.crf' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.gpnpd' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.storage' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'oel72-rac2'

CRS-2677: Stop of 'ora.mdnsd' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.asm' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'oel72-rac2'

CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.ctssd' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.evmd' on 'oel72-rac2'

CRS-2677: Stop of 'ora.ctssd' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.evmd' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'oel72-rac2'

CRS-2677: Stop of 'ora.cssd' on 'oel72-rac2' succeeded

CRS-2673: Attempting to stop 'ora.driver.afd' on 'oel72-rac2'

CRS-2673: Attempting to stop 'ora.gipcd' on 'oel72-rac2'

CRS-2677: Stop of 'ora.driver.afd' on 'oel72-rac2' succeeded

CRS-2677: Stop of 'ora.gipcd' on 'oel72-rac2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oel72-rac2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

2020/10/22 16:49:22 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.

2020/10/22 16:51:24 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.

2020/10/22 16:51:27 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

[root@oel72-rac2 install]#

Step-9: Updating Inventory in Node-2:

[root@oel72-rac2 ~]# cd $ORACLE_HOME

[root@oel72-rac2 grid]# cd oui/bin

[root@oel72-rac2 bin]# ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/12.2.0/grid "CLUSTER_NODES={oel72-rac2}" CRS=TRUE -local

The user is root. Oracle Universal Installer cannot continue installation if the user is root.

Login as 'oracle' user and do the following

[root@oel72-rac2 ~]# su - oracle

Last login: Thu Oct 22 16:47:52 EDT 2020 on pts/0

[oracle@oel72-rac2 ~]$

[oracle@oel72-rac2 ~]$ . oraenv

ORACLE_SID = [orcl2] ? +ASM2

ORACLE_HOME = [/home/oracle] ? /u01/app/12.2.0/grid

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@oel72-rac2 ~]$

[oracle@oel72-rac2 ~]$ cd $ORACLE_HOME

[oracle@oel72-rac2 grid]$ cd oui/bin/

[oracle@oel72-rac2 bin]$

[oracle@oel72-rac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/12.2.0/grid "CLUSTER_NODES={oel72-rac2}" CRS=TRUE -local

Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 10047 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

'UpdateNodeList' was successful.

[oracle@oel72-rac2 bin]$

Step-10: Deinstalling GRID_HOME from Node-2 (oel72-rac2)

[oracle@oel72-rac2 ~]$ cd $ORACLE_HOME

[oracle@oel72-rac2 grid]$ cd deinstall/

[oracle@oel72-rac2 deinstall]$

[oracle@oel72-rac2 deinstall]$ ./deinstall -local

Checking for required files and bootstrapping ...

Please wait ...

Location of logs /tmp/deinstall2020-10-22_04-58-28PM/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/oracle

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/deinstall2020-10-22_04-58-28PM/logs//crsdc_2020-10-22_04-58-38-PM.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2020-10-22_04-58-28PM/logs/netdc_check2020-10-22_04-58-38-PM.log

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

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2020-10-22_04-58-28PM/logs/asmcadc_check2020-10-22_05-00-42-PM.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/oracle

ASM Diskgroups :

ASM diskstring : /dev/sd*,AFD.*,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]: y

Specify the ASM Diagnostic Destination [/u01/app/oracle]:

Specify the diskstring [/dev/sd*,AFD.*,AFD:*]:

Specify the diskgroups that are managed by this ASM instance []:

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2020-10-22_04-58-28PM/logs/databasedc_check2020-10-22_05-01-07-PM.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,MGMTLSNR,LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,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/deinstall2020-10-22_04-58-28PM/logs/deinstall_deconfig2020-10-22_04-58-37-PM.out'

Any error messages from this session will be written to: '/tmp/deinstall2020-10-22_04-58-28PM/logs/deinstall_deconfig2020-10-22_04-58-37-PM.err'

################# DECONFIG CLEAN OPERATION START ########################

Database de-configuration trace file location: /tmp/deinstall2020-10-22_04-58-28PM/logs/databasedc_clean2020-10-22_05-01-10-PM.log

ASM de-configuration trace file location: /tmp/deinstall2020-10-22_04-58-28PM/logs/asmcadc_clean2020-10-22_05-01-10-PM.log

ASM Clean Configuration START

ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2020-10-22_04-58-28PM/logs/netdc_clean2020-10-22_05-01-14-PM.log

De-configuring Oracle Restart enabled listener(s): ASMNET1LSNR_ASM,MGMTLSNR,LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,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: MGMTLSNR

    Stopping listener: MGMTLSNR

    Warning: Failed to stop listener. Listener may not be running.

    Deleting listener: MGMTLSNR

    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_SCAN3

    Stopping listener: LISTENER_SCAN3

    Warning: Failed to stop listener. Listener may not be running.

    Deleting listener: LISTENER_SCAN3

    Listener deleted successfully.

Listener de-configured successfully.

De-configuring listener: LISTENER_SCAN2

    Stopping listener: LISTENER_SCAN2

    Warning: Failed to stop listener. Listener may not be running.

    Deleting listener: LISTENER_SCAN2

    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,MGMTLSNR,LISTENER,LISTENER_SCAN3,LISTENER_SCAN2,LISTENER_SCAN1

Oracle Restart is stopped and de-configured successfully.

#######################################################################

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

Using properties file /tmp/deinstall2020-10-22_04-58-28PM/response/deinstall_2020-10-22_04-58-37-PM.rsp

Location of logs /tmp/deinstall2020-10-22_04-58-28PM/logs/

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

################# DEINSTALL CHECK OPERATION SUMMARY #######################

A log of this session will be written to: '/tmp/deinstall2020-10-22_04-58-28PM/logs/deinstall_deconfig2020-10-22_04-58-37-PM.out'

Any error messages from this session will be written to: '/tmp/deinstall2020-10-22_04-58-28PM/logs/deinstall_deconfig2020-10-22_04-58-37-PM.err'

#################### DEINSTALL CLEAN OPERATION START ########################

## [START] Preparing for Deinstall ##

Setting LOCAL_NODE to oel72-rac2

Setting CRS_HOME to false

Setting oracle.installer.invPtrLoc to /tmp/deinstall2020-10-22_04-58-28PM/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

The Oracle Base directory '/u01/app/oracle' will not be removed on local node. The directory is not empty.

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) 'oel72-rac2' at the end of the session.

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'oel72-rac2' at the end of the session.

Run 'rm -r /etc/oratab' as root on node(s) 'oel72-rac2' at the end of the session.

Review the permissions and contents of '/u01/app/oracle' on nodes(s) 'oel72-rac2'.

If there are no Oracle home(s) associated with '/u01/app/oracle', manually delete '/u01/app/oracle' and its contents.

Oracle deinstall tool successfully cleaned up temporary directories.

#######################################################################

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

Note: Check the above recommendations and execute as a ‘root’ user.

[oracle@oel72-rac2 ~]$ su - root

Password:

Last login: Thu Oct 22 16:46:22 EDT 2020

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# rm -r /etc/oraInst.loc

rm: remove regular file ‘/etc/oraInst.loc’? y

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# rm -r /opt/ORCLfmap

rm: descend into directory ‘/opt/ORCLfmap’? y

rm: descend into directory ‘/opt/ORCLfmap/prot1_64’? y

rm: descend into directory ‘/opt/ORCLfmap/prot1_64/bin’? y

rm: remove regular file ‘/opt/ORCLfmap/prot1_64/bin/fmputl’? y

rm: remove regular file ‘/opt/ORCLfmap/prot1_64/bin/fmputlhp’? y

rm: remove directory ‘/opt/ORCLfmap/prot1_64/bin’? y

rm: descend into directory ‘/opt/ORCLfmap/prot1_64/etc’? y

rm: remove regular file ‘/opt/ORCLfmap/prot1_64/etc/filemap.ora’? y

rm: remove directory ‘/opt/ORCLfmap/prot1_64/etc’? y

rm: remove directory ‘/opt/ORCLfmap/prot1_64/log’? y

rm: remove directory ‘/opt/ORCLfmap/prot1_64’? y

rm: remove directory ‘/opt/ORCLfmap’? y

[root@oel72-rac2 ~]#

[root@oel72-rac2 ~]# rm -r /etc/oratab

rm: remove regular file ‘/etc/oratab’? y

[root@oel72-rac2 ~]#

Step-11: Update Inventory from Node-1:

[oracle@oel72-rac1 ~]$ . oraenv

ORACLE_SID = [orcl1] ? +ASM1

ORACLE_HOME = [/home/oracle] ? /u01/app/12.2.0/grid

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ cd $ORACLE_HOME

[oracle@oel72-rac1 grid]$ cd oui/bin

[oracle@oel72-rac1 bin]$ pwd

/u01/app/12.2.0/grid/oui/bin

[oracle@oel72-rac1 bin]$

[oracle@oel72-rac1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/12.2.0/grid  "CLUSTER_NODES={oel72-rac1}" CRS=TRUE

Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 10047 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

'UpdateNodeList' was successful.

[oracle@oel72-rac1 bin]$

[oracle@oel72-rac1 ~]$ su - root

Password:

Last login: Thu Oct 22 17:11:25 EDT 2020

[root@oel72-rac1 ~]#

[root@oel72-rac1 ~]# . oraenv

ORACLE_SID = [root] ? +ASM1

ORACLE_HOME = [/home/oracle] ? /u01/app/12.2.0/grid

The Oracle base has been set to /u01/app/oracle

[root@oel72-rac1 ~]#

[root@oel72-rac1 ~]# cd $ORACLE_HOME

[root@oel72-rac1 grid]# cd bin

Step-12: Delete the node using ‘crsctl’ from Node-1 (oel72-rac1)

[root@oel72-rac1 bin]# crsctl delete node -n oel72-rac2

CRS-4661: Node oel72-rac2 successfully deleted.

[root@oel72-rac1 bin]#

[root@oel72-rac1 bin]# crs_stat -t -v

Name           Type           R/RA   F/FT   Target    State     Host

----------------------------------------------------------------------

ora....GG.advm ora....me.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora.ACFSDG.dg  ora....up.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora....SM.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora.DATADG.dg  ora....up.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora....AF.lsnr ora....er.type 0/5    0/     OFFLINE   OFFLINE

ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    oel72-rac1

ora....N2.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    oel72-rac1

ora....N3.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    oel72-rac1

ora.MGMTLSNR   ora....nr.type 0/0    0/0    ONLINE    ONLINE    oel72-rac1

ora.OCRVD.dg   ora....up.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora....gg.acfs ora.acfs.type  0/5    0/     ONLINE    ONLINE    oel72-rac1

ora.asm        ora.asm.type   0/5    0/0    ONLINE    ONLINE    oel72-rac1

ora.chad       ora.chad.type  0/5    0/     ONLINE    ONLINE    oel72-rac1

ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    oel72-rac1

ora.mgmtdb     ora....db.type 0/2    0/1    ONLINE    ONLINE    oel72-rac1

ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    oel72-rac1

ora....ac1.ons application    0/3    0/0    ONLINE    ONLINE    oel72-rac1

ora....ac1.vip ora....t1.type 0/0    0/0    ONLINE    ONLINE    oel72-rac1

ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    oel72-rac1

ora.orcl.db    ora....se.type 0/2    0/1    ONLINE    ONLINE    oel72-rac1

ora....vc1.svc ora....ce.type 0/0    0/0    ONLINE    ONLINE    oel72-rac1

ora.proxy_advm ora....vm.type 0/5    0/     ONLINE    ONLINE    oel72-rac1

ora.qosmserver ora....er.type 0/1    0/2    ONLINE    ONLINE    oel72-rac1

ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    oel72-rac1

ora.scan2.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    oel72-rac1

ora.scan3.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    oel72-rac1

[root@oel72-rac1 bin]#

[root@oel72-rac1 bin]# crsctl check cluster -all

**************************************************************

oel72-rac1:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************

[root@oel72-rac1 bin]#

[root@oel72-rac1 bin]# olsnodes -s -t

oel72-rac1      Active  Unpinned

[root@oel72-rac1 bin]#

Step-13: Execute ‘cluvfy’ as a ‘oracle’ user

[root@oel72-rac1 bin]# cluvfy stage -post nodedel -n oel72-rac2

You must NOT be logged in as root (uid=0) when running /u01/app/12.2.0/grid/bin/cluvfy.

[root@oel72-rac1 bin]#

[root@oel72-rac1 ~]# exit

logout

[oracle@oel72-rac1 ~]$ . oraenv

ORACLE_SID = [+ASM1] ?

ORACLE_HOME = [/home/oracle] ? /u01/app/12.2.0/grid

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ cluvfy stage -post nodedel -n oel72-rac2

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:                                  Oct 22, 2020 5:17:07 PM

CVU home:                       /u01/app/12.2.0/grid/

User:                                   oracle

[oracle@oel72-rac1 ~]$

Step-14: Finally check the instance information from Node-1

[oracle@oel72-rac1 ~]$ . oraenv

ORACLE_SID = [orcl1] ? orcl1

The Oracle base remains unchanged with value /u01/app/oracle

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Oct 22 17:19:25 2020

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Advanced Analytics and Real Application Testing options

SQL> select instance_name,instance_number from gv$instance;

INSTANCE_NAME             INSTANCE_NUMBER

----------------                       -----------------------------

orcl1                                   1

 

SQL> select * from gv$active_instances;

   INST_ID             INST_NUMBER INST_NAME                                                                  CON_ID

----------                -----------               ------------------------------------------------------------      ----------

         1                  1                             oel72-rac1:orcl1                                                         0

SQL> exit

[oracle@oel72-rac1 ~]$ ps -ef | grep pmon

oracle    3013  9465  0 17:19 pts/0    00:00:00 grep --color=auto pmon

oracle    9722     1  0 16:12 ?        00:00:00 asm_pmon_+ASM1

oracle   10487     1  0 16:13 ?        00:00:00 apx_pmon_+APX1

oracle   10762     1  0 16:13 ?        00:00:00 mdb_pmon_-MGMTDB

oracle   11705     1  0 16:16 ?        00:00:00 ora_pmon_orcl1

[oracle@oel72-rac1 ~]$

[oracle@oel72-rac1 ~]$ srvctl status database -d orcl

Instance orcl1 is running on node oel72-rac1

[oracle@oel72-rac1 ~]$

Thursday, October 15, 2020

Honor to be TWICE Oracle Speaker at Oracle Open World (OOW), Y2017 and Y2018, San Francisco, USA

Honor to be TWICE Oracle Speaker at Oracle Open World (OOW), Y2017 and Y2018, San Francisco, USA

Oracle Open World (OOW) Y2017













Oracle Open World (OOW) Y2018







Honor to be SIX times Oracle Speaker at New York Oracle User Group (NYOUG), NY, USA

 Honor to be SIX times Oracle Speaker at New York Oracle User Group (NYOUG), NY, USA












Sunday, October 11, 2020

Oracle ASM Flex Disk Group Support for Multitenant Cloning Feature

 Oracle ASM Flex Disk Group Support for Multitenant Cloning Feature


A flex disk group enables the creation of point-in-time database clones. When an ASM database clone is made, all the files associated with the database are split together and provide an independent database.

Oracle Database 18c Release 1 provides ASM clones for multitenant databases i.e. PDBs. In later updates, this feature can also be used for non-multitenant databases.  

Example of making an ASM clone of a PDB:

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [orcl1] ? +ASM1
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ asmcmd
ASMCMD> lsdg
State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512             512   4096  4194304     40952    34892                0           34892              0             N  DATADG/
MOUNTED  EXTERN  N         512             512   4096  4194304     30712     2668                0            2668              0             Y  OCRVD/
MOUNTED  EXTERN  N         512             512   4096  4194304     30712    21264                0           21264              0             N  RECODG/
ASMCMD>

ASMCMD> lsattr -G DATADG -l
Name                        Value
access_control.enabled      FALSE
access_control.umask        066
appliance._partnering_type  GENERIC
ate_conversion_done         true
au_size                     4194304
cell.smart_scan_capable     FALSE
cell.sparse_dg              allnonsparse
compatible.advm             18.0.0.0.0
compatible.asm              18.0.0.0.0
compatible.rdbms            10.1.0.0.0
content.check               FALSE
content.type                data
content_hardcheck.enabled   FALSE
disk_repair_time            12.0h
failgroup_repair_time       24.0h
idp.boundary                auto
idp.type                    dynamic
logical_sector_size         512
phys_meta_replicated        true
preferred_read.enabled      FALSE
scrub_async_limit           1
scrub_metadata.enabled      TRUE
sector_size                 512
thin_provisioned            FALSE
vam_migration_done          false
ASMCMD>

ASMCMD> lsattr -G RECODG -l
Name                        Value
access_control.enabled      FALSE
access_control.umask        066
appliance._partnering_type  GENERIC
ate_conversion_done         true
au_size                     4194304
cell.smart_scan_capable     FALSE
cell.sparse_dg              allnonsparse
compatible.advm             18.0.0.0.0
compatible.asm              18.0.0.0.0
compatible.rdbms            10.1.0.0.0
content.check               FALSE
content.type                data
content_hardcheck.enabled   FALSE
disk_repair_time            12.0h
failgroup_repair_time       24.0h
idp.boundary                auto
idp.type                    dynamic
logical_sector_size         512
phys_meta_replicated        true
preferred_read.enabled      FALSE
scrub_async_limit           1
scrub_metadata.enabled      TRUE
sector_size                 512
thin_provisioned            FALSE
vam_migration_done          false
ASMCMD>

ASMCMD> exit
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ sqlplus / as sysasm
SQL*Plus: Release 18.0.0.0.0 - Production on Sun Oct 11 14:04:02 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0

SQL> alter diskgroup DATADG set attribute 'compatible.rdbms'='18.0';
Diskgroup altered.

SQL> alter diskgroup RECODG set attribute 'compatible.rdbms'='18.0';
Diskgroup altered.
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ asmcmd lsattr -G DATADG -l
Name                        Value
access_control.enabled      FALSE
access_control.umask        066
appliance._partnering_type  GENERIC
ate_conversion_done         true
au_size                     4194304
cell.smart_scan_capable     FALSE
cell.sparse_dg              allnonsparse
compatible.advm             18.0.0.0.0
compatible.asm              18.0.0.0.0
compatible.rdbms            18.0
content.check               FALSE
content.type                data
content_hardcheck.enabled   FALSE
disk_repair_time            12.0h
failgroup_repair_time       24.0h
idp.boundary                auto
idp.type                    dynamic
logical_sector_size         512
phys_meta_replicated        true
preferred_read.enabled      FALSE
scrub_async_limit           1
scrub_metadata.enabled      TRUE
sector_size                 512
thin_provisioned            FALSE
vam_migration_done          false
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ asmcmd lsattr -G RECODG -l
Name                        Value
access_control.enabled      FALSE
access_control.umask        066
appliance._partnering_type  GENERIC
ate_conversion_done         true
au_size                     4194304
cell.smart_scan_capable     FALSE
cell.sparse_dg              allnonsparse
compatible.advm             18.0.0.0.0
compatible.asm              18.0.0.0.0
compatible.rdbms            18.0
content.check               FALSE
content.type                data
content_hardcheck.enabled   FALSE
disk_repair_time            12.0h
failgroup_repair_time       24.0h
idp.boundary                auto
idp.type                    dynamic
logical_sector_size         512
phys_meta_replicated        true
preferred_read.enabled      FALSE
scrub_async_limit           1
scrub_metadata.enabled      TRUE
sector_size                 512
thin_provisioned            FALSE
vam_migration_done          false
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ sqlplus / as sysasm
SQL*Plus: Release 18.0.0.0.0 - Production on Sun Oct 11 14:09:43 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0

SQL> set lines 100 pages 100
SQL> select name,type from v$asm_diskgroup where name='DATADG';
NAME                           TYPE
------------------------------ ------
DATADG                         EXTERN

If diskgroup type, where datafiles are located is normal, then convert it into flex:

SQL> alter diskgroup DATADG convert redundancy to flex;
alter diskgroup DATADG convert redundancy to flex
*
ERROR at line 1:
ORA-15067: command or option incompatible with diskgroup redundancy
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0
[oracle@rac1-18c ~]$

So, added two disks each 50G to create new disk group for Flex Disk Group with "flex" redundancy.

[root@rac1-18c ~]# fdisk /dev/sdt
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x162353ae.
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-104857599, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599):
Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1-18c ~]#

[root@rac1-18c ~]# fdisk /dev/sdu
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xbf260a36.
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-104857599, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599):
Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1-18c ~]#
[root@rac1-18c ~]# partprobe

[root@rac1-18c ~]#

Add newly created disks to "udev" rules.

[root@rac1-18c ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB861bb2e9-be7dc0d5", SYMLINK+="ocr-vote1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB204d9b3b-60370229", SYMLINK+="ocr-vote2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB8f0b98f4-0ef900d1", SYMLINK+="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB6076c35e-1767e318", SYMLINK+="asm-disk2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB91e4a118-d6f53c31", SYMLINK+="asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBe90328b2-f577014f", SYMLINK+="asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"
[root@rac1-18c ~]#

[root@rac1-18c ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdt
1ATA_VBOX_HARDDISK_VB6cb5e9c3-30138903
[root@rac1-18c ~]#

[root@rac1-18c ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdu
1ATA_VBOX_HARDDISK_VBb6990eec-e7c8ccd7
[root@rac1-18c ~]#

[root@rac1-18c ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
[root@rac1-18c ~]#

[root@rac1-18c ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB861bb2e9-be7dc0d5", SYMLINK+="ocr-vote1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB204d9b3b-60370229", SYMLINK+="ocr-vote2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB8f0b98f4-0ef900d1", SYMLINK+="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB6076c35e-1767e318", SYMLINK+="asm-disk2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB91e4a118-d6f53c31", SYMLINK+="asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBe90328b2-f577014f", SYMLINK+="asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB6cb5e9c3-30138903", SYMLINK+="asm-disk5", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBb6990eec-e7c8ccd7", SYMLINK+="asm-disk6", OWNER="oracle", GROUP="dba", MODE="0660"
[root@rac1-18c ~]#
[root@rac1-18c ~]# /sbin/partprobe /dev/sdt1
[root@rac1-18c ~]#
[root@rac1-18c ~]# /sbin/partprobe /dev/sdu1
[root@rac1-18c ~]#

Update Node-2 with two disks:

After Executing ASMCA, got the error saying that we need three minimum disk groups to setup FLEX Redundancy.

































































































We need minimum three disks to create "FLEX" redundancy. See the error below.











So, creating one more additional disk for the disk group (FLEXDG).

[root@rac1-18c ~]# fdisk /dev/sdv
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xa55269ea.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-104857599, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-104857599, default 104857599):
Using default value 104857599
Partition 1 of type Linux and of size 50 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1-18c ~]#

[root@rac1-18c ~]# partprobe
[root@rac1-18c ~]#

[root@rac1-18c ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdv
1ATA_VBOX_HARDDISK_VB90416f21-c627794e
[root@rac1-18c ~]#

[root@rac1-18c ~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
[root@rac1-18c ~]#
[root@rac1-18c ~]# /sbin/partprobe /dev/sdv1

Created Disk group using FLEXDG

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [orcl] ? +ASM1
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid

[oracle@rac1-18c ~]$ asmca &
[1] 16641
[oracle@rac1-18c ~]$
[1]+  Done                    asmca
[oracle@rac1-18c ~]$



























[oracle@rac1-18c ~]$ asmcmd lsattr -G FLEXDG -l
Name                        Value
access_control.enabled      FALSE
access_control.umask        066
appliance._partnering_type  GENERIC
ate_conversion_done         true
au_size                     4194304
cell.smart_scan_capable     FALSE
cell.sparse_dg              allnonsparse
compatible.advm             18.0.0.0.0
compatible.asm              18.0.0.0.0
compatible.rdbms            18.0.0.0.0
content.check               FALSE
content.type                data
content_hardcheck.enabled   FALSE
disk_repair_time            12.0h
failgroup_repair_time       24.0h
idp.boundary                auto
idp.type                    dynamic
logical_sector_size         512
phys_meta_replicated        true
preferred_read.enabled      FALSE
scrub_async_limit           1
scrub_metadata.enabled      TRUE
sector_size                 512
thin_provisioned            FALSE
vam_migration_done          true
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ sqlplus / as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on Sun Oct 11 15:52:36 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0

SQL> set lines 100 pages 100
SQL> select name,type from v$asm_diskgroup where name='FLEXDG';

NAME                           TYPE
------------------------------ ------
FLEXDG                         FLEX

SQL>

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [+ASM1] ? orcl
The Oracle base has been changed from /u01/app/grid to /u01/app/oracle
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ dbca &
[1] 30650
[oracle@rac1-18c ~]$

Created Pluggable Database (PDB) placing on "FLEXDG" disk group

[oracle@rac1-18c ~]$ ps -ef | grep pmon
oracle   17580     1  0 15:43 ?        00:00:00 asm_pmon_+ASM1
oracle   19891 14248  0 16:08 pts/0    00:00:00 grep --color=auto pmon
oracle   19952     1  0 15:43 ?        00:00:00 apx_pmon_+APX1
oracle   20774     1  0 15:43 ?        00:00:00 ora_pmon_orcl1
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [orcl] ? +ASM1
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ ps -ef | grep pmon
oracle    7517     1  0 16:23 ?        00:00:00 ora_pmon_cdb11
oracle   11912 14248  0 16:29 pts/0    00:00:00 grep --color=auto pmon
oracle   17580     1  0 15:43 ?        00:00:00 asm_pmon_+ASM1
oracle   19952     1  0 15:43 ?        00:00:00 apx_pmon_+APX1
oracle   20774     1  0 15:43 ?        00:00:00 ora_pmon_orcl1
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ asmcmd lsfg
File Group         Disk Group  Quota Group  Used Quota MB  Client Name    Client Type
DEFAULT_FILEGROUP  FLEXDG      GENERIC      0
CDB1_CDB$ROOT      FLEXDG      GENERIC      5336           CDB1_CDB$ROOT  DATABASE
CDB1_PDB$SEED      FLEXDG      GENERIC      1648           CDB1_PDB$SEED  DATABASE
CDB1_PDB           FLEXDG      GENERIC      1872           CDB1_PDB       DATABASE
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [cdb11] ? cdb1
The Oracle base has been changed from /u01/app/grid to /u01/app/oracle
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ sqlplus sys/oracle@cdb1 as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Sun Oct 11 16:34:04 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE NO
SQL>

SQL> alter pluggable database pdb save state;
Pluggable database altered.

SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [cdb1] ? +ASM1
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ asmcmd lsfg
File Group         Disk Group  Quota Group  Used Quota MB  Client Name    Client Type
DEFAULT_FILEGROUP  FLEXDG      GENERIC      0
CDB1_CDB$ROOT      FLEXDG      GENERIC      5376           CDB1_CDB$ROOT  DATABASE
CDB1_PDB$SEED      FLEXDG      GENERIC      1648           CDB1_PDB$SEED  DATABASE
CDB1_PDB           FLEXDG      GENERIC      1896           CDB1_PDB       DATABASE
[oracle@rac1-18c ~]$








[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [+ASM1] ? cdb1
The Oracle base has been changed from /u01/app/grid to /u01/app/oracle
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ sqlplus sys/oracle@cdb1 as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Sun Oct 11 16:36:31 2020
Version 18.5.0.0.0
Copyright (c) 1982, 2018, Oracle.  All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE NO
SQL>

SQL> alter session set container=PDB;
Session altered.

SQL> show con_name

CON_NAME
------------------------------
PDB
SQL>

SQL> alter pluggable database pdb prepare mirror copy pdbcopy;
Pluggable database altered.
SQL>

SQL> show user
USER is "SYS"
SQL>

SQL> show con_name

CON_NAME
------------------------------
PDB
SQL>

SQL> create pluggable database pdb_new from pdb using mirror copy pdbcopy;
Pluggable database created.

If you get an ORA-59003, wait a few minutes and try again. The error indicates that the copy is not ready to be split yet.

After finishing the above steps, a new independent file group and new PDB is created. Check the number of pdbs:

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                            READ WRITE NO
         4 PDB_NEW                        MOUNTED
SQL>

SQL> alter pluggable database pdb_new open read write instances=all;
Pluggable database altered.
SQL>

At this point, you can connect to PDB_NEW as a new database that was previously a copy of PDB. 

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                                   READ WRITE NO
         4 PDB_NEW                        READ WRITE NO
SQL>

SQL> alter pluggable database pdb_new save state instances=all;
Pluggable database altered.
SQL>

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 PDB                                   READ WRITE NO
         4 PDB_NEW                        READ WRITE NO
SQL>

SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.5.0.0.0
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ . oraenv
ORACLE_SID = [cdb1] ? +ASM1
The Oracle base has been changed from /u01/app/oracle to /u01/app/grid
[oracle@rac1-18c ~]$

[oracle@rac1-18c ~]$ asmcmd lsfg
File Group         Disk Group  Quota Group  Used Quota MB  Client Name    Client Type
DEFAULT_FILEGROUP  FLEXDG      GENERIC      0
CDB1_CDB$ROOT      FLEXDG      GENERIC      5376           CDB1_CDB$ROOT  DATABASE
CDB1_PDB$SEED      FLEXDG      GENERIC      1648           CDB1_PDB$SEED  DATABASE
CDB1_PDB           FLEXDG      GENERIC      1896           CDB1_PDB       DATABASE
PDBCOPY            FLEXDG      GENERIC      1896           CDB1_PDB_NEW   DATABASE
[oracle@rac1-18c ~]$









Summary:

A flex disk group enables the creation of point-in-time database clones. When an ASM database clone is made, all the files associated with the database are split together and provide an independent database.