CONVERT NON ASM (File System) SINGLE INSTANCE DATABASE TO RAC DATABASE USING RCONFIG: Oracle 11g R2 RAC:

CONVERT NON ASM ( File System ) SINGLE INSTANCE DATABASE TO RAC DATABASE USING RCONFIG: Oracle 11g R2 RAC:

For converting standalone to RAC database, both the environments should be running on the same operating system and using the same oracle release. Oracle supports the following methods to convert a single-instance database to an RAC database:

  1. DBCA
  2. Oracle Enterprise Manager (grid control)
  3. RCONFIG
  4. Manual method

With my post, I will demonstrate you to convert non ASM single instance database to RAC database by using the rconfig command-line tool. During the conversion, rconfig performs the following steps automatically:

  • Migrating the database to ASM, if specified
  • Creating RAC database instances on all specified nodes in the cluster.
  • Configuring the Listener and Net Service entries.
  • Registering services with CRS.
  • Starting up the instances and listener on all nodes.

In Oracle 11g R2, a single-instance database can either be converted to an administrator-managed cluster database or a policy-managed cluster database.

When you navigate through the $ORACLE_HOME/assistants/rconfig/sampleXMLS, you will find two sample XML input files.

  • ConvertToRAC_AdminManaged.xml
  • ConvertToRAC_PolicyManaged.xml

While converting a single-instance database, with file system storage, to an RAC database with Automatic Storage Management (ASM), rconfig invokes RMAN internally to back up the database to proceed with converting non-ASM to ASM. Therefore, to make backup faster it is better to increase the PARALLELISM in configuration settings, which will use more RMAN channels in the RMAN on the local node and will make backup run faster and eventually reduces the conversion duration. For example, you may configure the following in the RMAN settings of pawdb database on the local node.

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3;

CURRENT SCENARIO:

  • RAC 2 Node Cluster setup
  • Names of nodes : paw-racnode1, paw-racnode2
  • Name of Multi instance RAC database with ASM storage : racdb
  • Name of single instance database with file system storage : pawdb
  • Source Oracle home : /u01/app/oracle/product/11.2.0/db_1
  • Target Oracle home : /u01/app/oracle/product/11.2.0/db_1

OBJECTIVE:

  • Convert pawdb single instance Non ASM database to an Admin managed RAC database running on two nodes paw-racnode1 and paw-racnode2.
  • Change storage from File system to ASM with
  • Data files on +PAWDB_DATA diskgroup
  • Flash recovery area on +FRA diskgroup

IMPLEMENTATION:

– Created a single Instance File system ( Non ASM ) database : pawdb

[oracle@paw-racnode1 ~ ]$ srvctl config database -d pawdb

Database unique name: pawdb

Database name: pawdb

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

Oracle user: oracle

Spfile:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Server pools: pawdb

Database instances: pawdb

Disk Groups:

Services:

Database is administrator managed

[grid@paw-racnode1 ~]$ srvctl status database -d pawdb

Instance pawdb is running on node paw-racnode1

[oracle@paw-racnode1 ~]$ . oraenv

ORACLE_SID = [orcl] ? pawdb

The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle

[oracle@paw-racnode1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Dec 10 16:33:52 2016

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

SQL> select name from v$datafile;

NAME

————————————————————————–u01/app/oracle/oradata/pawdb/system01.dbf

/u01/app/oracle/oradata/pawdb/sysaux01.dbf

/u01/app/oracle/oradata/pawdb/undotbs01.dbf

/u01/app/oracle/oradata/pawdb/users01.dbf

/u01/app/oracle/oradata/pawdb/example01.dbf

– Copy  ConvertToRAC_AdminManaged.xml   to another file  convert.xml 

[oracle@paw-racnode1 ~]$ cd $ORACLE_HOME/assistants/rconfig/sampleXMLs

[oracle@paw-racnode1 sampleXMLs]$ cp ConvertToRAC_AdminManaged.xml convert.xml

[oracle@paw-racnode1 sampleXMLs]$ cat convert.xml

<?xml version=”1.0″ encoding=”UTF-8″?>

<n:RConfig xmlns:n=”http://www.oracle.com/rconfig”

           xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”

           xsi:schemaLocation=”http://www.oracle.com/rconfig”>

    <n:ConvertToRAC>

<!– Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY –>

        <n:Convert verify=”YES”>

<!–Specify current OracleHome of non-rac database for SourceDBHome –>

              <n:SourceDBHome>/oracle/product/11.2.0/db_1</n:SourceDBHome>

<!–Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome –>

              <n:TargetDBHome>/oracle/product/11.2.0/db_1</n:TargetDBHome>

<!–Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion –>

              <n:SourceDBInfo SID=”orcl”>

                <n:Credentials>

                  <n:User>sys</n:User>

                  <n:Password>oracle</n:Password>

                  <n:Role>sysdba</n:Role>

                </n:Credentials>

              </n:SourceDBInfo>

<!–Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. –>

              <n:NodeList>

                <n:Node name=”node1″/>

                <n:Node name=”node2″/>

              </n:NodeList>

<!–Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.–>

              <n:InstancePrefix>sales</n:InstancePrefix>

<!– Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. –>

<!–Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ASM credentials are no needed for conversion. –>

              <n:SharedStorage type=”ASM”>

<!–Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path. –>

                <n:TargetDatabaseArea>+ASMDG</n:TargetDatabaseArea>

<!–Specify Flash Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area. –>

                <n:TargetFlashRecoveryArea>+ASMDG</n:TargetFlashRecoveryArea>

              </n:SharedStorage>

– Edit convert.xml file and make following changes :

  • Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY : In my case , I have Taken : YES
  • Specify current OracleHome of non-rac database for SourceDBHome : In my case , I have Taken : /u01/app/oracle/product/11.2.0/db_1
  • Specify OracleHome where the rac database should be configured. It can be same as Source DBHome. : In my case , I have Taken : /u01/app/oracle/product/11.2.0/db_1
  • Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion. : In my case : database is pawdb and my sysdba user is sys and sys user password is sys and role is
  • Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. : In my case : paw-racnode1, paw-racnode2
  • Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name. : In my case , I have Taken : pawdb ( instance names will appear pawdb1, pawdb2)
  • Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. : Check local and scan listeners are up and running
  • Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ASM credentials are no needed for conversion. : In my case: ASM ( Because my storage type is ASM )
  • Specify Database Area Location to be configured for rac database. If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path. : In my case , I have Taken : +PAWDB_DATA ( I have created a separate diskgroup PAWDB_DATA to store datafiles of pawdb database on ASM )
  • Specify Flash Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area. : In my case , I have Taken : +FRA

– Modified:                                     

[oracle@paw-racnode1 sampleXMLs]$ vi convert.xml

<?xml version=”1.0″ encoding=”UTF-8″?>

<n:RConfig xmlns:n=”http://www.oracle.com/rconfig”

           xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”

           xsi:schemaLocation=”http://www.oracle.com/rconfig”>

    <n:ConvertToRAC>  

<!– Verify does a precheck to ensure all pre-requisites are met, before the conversion is attempted. Allowable values are: YES|NO|ONLY –>

        <n:Convert verify=”YES“>

<!–Specify current OracleHome of non-rac database for SourceDBHome –>

              <n:SourceDBHome>/u01/app/oracle/product/11.2.0/db_1</n:SourceDBHome>

<!–Specify OracleHome where the rac database should be configured. It can be same as SourceDBHome –>

              <n:TargetDBHome>/u01/app/oracle/product/11.2.0/db_1</n:TargetDBHome>

<!–Specify SID of non-rac database and credential. User with sysdba role is required to perform conversion –>

              <n:SourceDBInfo SID=”pawdb“>

                <n:Credentials>

                  <n:User>sys</n:User>

                  <n:Password>sys</n:Password>

                  <n:Role>sysdba</n:Role>

                </n:Credentials>

              </n:SourceDBInfo>

<!–Specify the list of nodes that should have rac instances running for the Admin Managed Cluster Database. LocalNode should be the first node in this nodelist. –>

              <n:NodeList>       

                <n:Node name=”paw-racnode1“/>

                <n:Node name=”paw-racnode2“/>

              </n:NodeList>

<!–Instance Prefix tag is optional starting with 11.2. If left empty, it is derived from db_unique_name.–>

              <n:InstancePrefix>pawdb</n:InstancePrefix>

<!– Listener details are no longer needed starting 11.2. Database is registered with default listener and SCAN listener running from Oracle Grid Infrastructure home. –>

<!–Specify the type of storage to be used by rac database. Allowable values are CFS|ASM. The non-rac database should have same storage type. ASM credentials are no needed for conversion. –>

              <n:SharedStorage type=”ASM“>

<!–Specify Database Area Location to be configured for rac database.If this field is left empty, current storage will be used for rac database. For CFS, this field will have directory path. –>

                <n:TargetDatabaseArea>+PAWDB_DATA</n:TargetDatabaseArea>

<!–Specify Flash Recovery Area to be configured for rac database. If this field is left empty, current recovery area of non-rac database will be configured for rac database. If current database is not using recovery Area, the resulting rac database will not have a recovery area. –>

                <n:TargetFlashRecoveryArea>+FRA</n:TargetFlashRecoveryArea>

              </n:SharedStorage>

        </n:Convert>

    </n:ConvertToRAC>

</n:RConfig>

– Run rconfig to convert pawdb from single instance database to 2 instance RAC database

[oracle@paw-racnode1 sampleXMLs]$ rconfig convert.xml

Converting Database “pawdb” to Cluster Database. Target Oracle Home: /u01/app/oracle/product/11.2.0/db_1. Database Role: PRIMARY.

Setting Data Files and Control Files

Adding Database Instances

Adding Redo Logs

Enabling threads for all Database Instances

Setting TEMP tablespace

Adding UNDO tablespaces

Adding Trace files

Setting Flash Recovery Area

Updating Oratab

Creating Password file(s)

Configuring Listeners

Configuring related CRS resources

Starting Cluster Database

<?xml version=”1.0″ ?>

<RConfig version=”1.1″ >

<ConvertToRAC>

    <Convert>

      <Response>

        <Result code=”0″ >

          Operation Succeeded

        </Result>

      </Response>

      <ReturnValue type=”object”>

<Oracle_Home>

         /u01/app/oracle/product/11.2.0/db_1

       </Oracle_Home>

       <Database type=”ADMIN_MANAGED”  >

         <InstanceList>

           <Instance SID=”pawdb1″ Node=”paw-racnode1″  >

           </Instance>

           <Instance SID=”pawdb2″ Node=”paw-racnode2″  >

           </Instance>

         </InstanceList>

       </Database>     </ReturnValue>

    </Convert>

  </ConvertToRAC></RConfig>

– Check the latest log file for rconfig while conversion is going on :

[oracle@paw-racnode1 sampleXMLs]$   ls -lrt $ORACLE_BASE/cfgtoollogs/rconfig/*.log

[oracle@paw-racnode1 sampleXMLs]$   tail  -f $ORACLE_BASE/cfgtoollogs/rconfig/*.log

Click on link to see the log generated in my conversion: rconfig_08_11_15_17_56_43

– Note that rconfig adds password file to all the nodes but entry to tnsnames.ora needs  to be modified ( We have to mention scan name instead of host name ) on the local node and add the same to  the other nodes.

Following is the entry I have modified on the local node and copied to rest of the nodes :

– Original:

PAWDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = paw-racnode1.airydba.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = pawdb)

    )

  )

– Modified:

PAWDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = paw-rac01-scan.airydba.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = pawdb)

    )

  )

– Add entry in /etc/oratab of paw-racnode1 as :

         pawdb1: /u01/app/oracle/product/11.2.0/db_1

 – Add entry in /etc/oratab of paw-racnode2 as :

        pawdb2: /u01/app/oracle/product/11.2.0/db_1

– Check that the database has been converted successfully and 2 instances (pawdb1,pawdb2) are running on different nodes:

[oracle@paw-racnode1 sampleXMLs]$ srvctl status database -d pawdb

Instance pawdb1 is running on node pawracnode1

Instance pawdb2 is running on node paw-racnode2

[grid@paw-racnode1 sampleXMLs]$ crsctl stat res -t

--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS 
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.FRA.dg
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.LISTENER.lsnr
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.OCR_DG.dg
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.PAWDB_DATA.dg
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.asm
 ONLINE ONLINE paw-racnode1 Started 
 ONLINE ONLINE paw-racnode2 Started 
ora.eons
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.gsd
 OFFLINE OFFLINE paw-racnode1 
 OFFLINE OFFLINE paw-racnode2 
ora.net1.network
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.ons
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
ora.registry.acfs
 ONLINE ONLINE paw-racnode1 
 ONLINE ONLINE paw-racnode2 
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
 1 ONLINE ONLINE paw-racnode2 
ora.LISTENER_SCAN2.lsnr
 1 ONLINE ONLINE paw-racnode1 
ora.LISTENER_SCAN3.lsnr
 1 ONLINE ONLINE paw-racnode1 
ora.oc4j
 1 OFFLINE OFFLINE 
ora.orcl.db
 1 OFFLINE OFFLINE 
ora.paw-racnode1.vip
 1 ONLINE ONLINE paw-racnode1 
ora.paw-racnode2.vip
 1 ONLINE ONLINE paw-racnode2 
ora.pawdb.db
 1 ONLINE ONLINE paw-racnode1 Open 
 2 ONLINE ONLINE paw-racnode2 Open 
ora.racdb.db
 1 OFFLINE OFFLINE 
 2 OFFLINE OFFLINE 
ora.scan1.vip
 1 ONLINE ONLINE paw-racnode2 
ora.scan2.vip
 1 ONLINE ONLINE paw-racnode1 
ora.scan3.vip
 1 ONLINE ONLINE paw-racnode1                              

– Check that database can be connected remotely from second node (paw-racnde2 ) and also check that datafiles have been Converted in to ASM:

[grid@paw-racnode2 ~]$ su oracle

Password:

[oracle@paw-racnode2 grid]$ . oraenv

ORACLE_SID = [+ASM2] ? pawdb2

The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle

[oracle@paw-racnode2 grid]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Aug 11 18:31:48 2015

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production

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

Data Mining and Real Application Testing options

SQL> select name from v$database;

NAME

———

PAWDB

SQL> select name from V$datafile;

NAME

————————————————————————–

+PAWDB_DATA/pawdb/datafile/system.256.930333443

+PAWDB_DATA/pawdb/datafile/sysaux.257.930333527

+PAWDB_DATA/pawdb/datafile/undotbs1.258.930333589

+PAWDB_DATA/pawdb/datafile/users.259.930333597

+PAWDB_DATA/pawdb/datafile/undotbs2.270.930333939

Okay, so we are able to recognize that single instance ( Non ASM ) database pawdb has been successfully converted into RAC database. Hope you enjoyed and learn some thing from my this post. Please do comment on this post if you liked it.

Thank you for reading… This is Airy…Enjoy Learning:)

 

 

#rac

GPnP Profile Inside: pending.xml always creates, whether profile.xml exists or not:

GPnP Profile Inside:  pending.xml always creates, whether profile.xml exists or not:

Practical 1 : Stop and start crs after removing profile.xml:      

Step1: Renamed profile.xml to profile.paw :

[grid@paw-racnode1 ~]$ cd /u01/app/11.2.0/grid/gpnp/paw-racnode1/profiles/peer/

[grid@paw-racnode1 peer]$ ll

total 12

-rw-r–r– 1 grid oinstall 1905 Aug  7 13:57 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 13:55 profile_orig.xml

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.xml

[grid@paw-racnode1 peer]$ pwd

/u01/app/11.2.0/grid/gpnp/paw-racnode1/profiles/peer

[grid@paw-racnode1 peer]$ gpnptool get

Warning: some command line parameters were defaulted. Resulting command line:

         /u01/app/11.2.0/grid/bin/gpnptool.bin get -o-

ClusterName=”paw-rac-cluster” PALocation=””> HIz8dOjUIFB32YPkmXW2HMVazoY=L6GOD0rB03Hp+NoKVcIHb9/Rp3xznBKpUJGfixN/27Qo6IL8/4HkjSnzsbHf1IuK1SQfqV5624tygB0x9HJfVcW+k6E6cQWwAgZOzpPR3ltctD7XeikkXtt5TOWQ6boMvCKJ5mOwzGzuj4S/qDu7lWPBHM9EPzHAEn/8NOlDcDo=

Success.

[grid@paw-racnode1 peer]$ mv profile.xml profile.paw

[grid@paw-racnode1 peer]$ ll

total 12

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.paw

-rw-r–r– 1 grid oinstall 1905 Aug  7 13:57 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 13:55 profile_orig.xml

Step2: Stop crs after removing profile.xml:

[grid@paw-racnode1 peer]$ su –

Password:

[root@paw-racnode1 ~]# crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.crsd’ on ‘paw-racnode1’

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.OCR_DG.dg’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.orcl.db’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.racdb.db’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.registry.acfs’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.scan3.vip’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.paw-racnode1.vip’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.scan3.vip’ on ‘paw-racnode1’ succeeded

CRS-2672: Attempting to start ‘ora.scan3.vip’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.paw-racnode1.vip’ on ‘paw-racnode1’ succeeded

CRS-2672: Attempting to start ‘ora.paw-racnode1.vip’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.scan2.vip’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.scan2.vip’ on ‘paw-racnode1’ succeeded

CRS-2672: Attempting to start ‘ora.scan2.vip’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.registry.acfs’ on ‘paw-racnode1’ succeeded

CRS-2676: Start of ‘ora.paw-racnode1.vip’ on ‘paw-racnode2’ succeeded

CRS-2676: Start of ‘ora.scan2.vip’ on ‘paw-racnode2’ succeeded

CRS-2676: Start of ‘ora.scan3.vip’ on ‘paw-racnode2’ succeeded

CRS-2672: Attempting to start ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode2’

CRS-2672: Attempting to start ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode2’

CRS-2676: Start of ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode2’ succeeded

CRS-2676: Start of ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.OCR_DG.dg’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.racdb.db’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.orcl.db’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.DATA.dg’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.FRA.dg’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.DATA.dg’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.FRA.dg’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.asm’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.asm’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.ons’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.eons’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.ons’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.net1.network’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.net1.network’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.eons’ on ‘paw-racnode1’ succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘paw-racnode1’ has completed

CRS-2677: Stop of ‘ora.crsd’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.evmd’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.asm’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.drivers.acfs’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.gpnpd’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.evmd’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.mdnsd’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.ctssd’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.drivers.acfs’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.asm’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.cssd’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.cssd’ on ‘paw-racnode1’ succeeded

CRS-2673: Attempting to stop ‘ora.diskmon’ on ‘paw-racnode1’

CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.gipcd’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.diskmon’ on ‘paw-racnode1’ succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘paw-racnode1’ has completed

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

[root@paw-racnode1 ~]# cd /u01/app/11.2.0/grid/gpnp/paw-racnode1/profiles/peer/

[root@paw-racnode1 peer]# ll

total 12

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.paw

-rw-r–r– 1 grid oinstall 1905 Aug  7 13:57 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 13:55 profile_orig.xml

Step3: Start the crs :

[root@paw-racnode1 peer]# crsctl start crs

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

Step4: Check whether pending.xml created:

[root@paw-racnode1 peer]# ll

total 16

-rw-r–r– 1 grid oinstall 1905 Nov 28 16:23 pending.xml

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.paw

-rw-r–r– 1 grid oinstall 1905 Aug  7 13:57 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 13:55 profile_orig.xml

[root@paw-racnode1 peer]# cat pending.xml

HIz8dOjUIFB32YPkmXW2HMVazoY=L6GOD0rB03Hp+NoKVcIHb9/Rp3xznBKpUJGfixN/27Qo6IL8/4HkjSnzsbHf1IuK1SQfqV5624tygB0x9HJfVcW+k6E6cQWwAgZOzpPR3ltctD7XeikkXtt5TOWQ6boMvCKJ5mOwzGzuj4S/qDu7lWPBHM9EPzHAEn/8NOlDcDo=

Step5: Check after some time, whether pending.xml exist:

[root@paw-racnode1 peer]# ll

total 16

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.paw

-rw-r–r– 1 grid oinstall 1905 Aug  7 13:57 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 13:55 profile_orig.xml

Conclusion 1: Whenever GPnP profile is not present, it is automatically copied from existing nodes by GPnPd as pending.xml. As you can see entries are same as was in profile.xml. This pending.xml automatically disappears , when all services and resources of cluster comes up.

[root@paw-racnode1 peer]# crsctl check cluster -all

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

paw-racnode1:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

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

paw-racnode2:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

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

Practical 2: Stop and start crs without removing profile.xml:

Step1: Check whether profile.xml exist:

[grid@paw-racnode2 ~]$ su –

Password:

[root@paw-racnode2 ~]# cd /u01/app/11.2.0/grid/gpnp/paw-racnode2/profiles/peer

[root@paw-racnode2 peer]# ll

total 12

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:05 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 14:05 profile_orig.xml

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.xml

Step2: Stop the crs without removing profile.xml

[root@paw-racnode2 peer]# crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.crsd’ on ‘paw-racnode2’

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.OCR_DG.dg’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.VOTE_DG.dg’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.VOTE_EXT.dg’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.VOTE_HI.dg’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.racdb.db’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.registry.acfs’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.LISTENER.lsnr’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.scan3.vip’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.scan2.vip’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.scan3.vip’ on ‘paw-racnode2’ succeeded

CRS-2672: Attempting to start ‘ora.scan3.vip’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.scan2.vip’ on ‘paw-racnode2’ succeeded

CRS-2672: Attempting to start ‘ora.scan2.vip’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.paw-racnode2.vip’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.paw-racnode2.vip’ on ‘paw-racnode2’ succeeded

CRS-2672: Attempting to start ‘ora.paw-racnode2.vip’ on ‘paw-racnode1’

CRS-2677: Stop of ‘ora.VOTE_EXT.dg’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.registry.acfs’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.VOTE_HI.dg’ on ‘paw-racnode2’ succeeded

CRS-2676: Start of ‘ora.paw-racnode2.vip’ on ‘paw-racnode1’ succeeded

CRS-2676: Start of ‘ora.scan2.vip’ on ‘paw-racnode1’ succeeded

CRS-2676: Start of ‘ora.scan3.vip’ on ‘paw-racnode1’ succeeded

CRS-2672: Attempting to start ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode1’

CRS-2672: Attempting to start ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode1’

CRS-2676: Start of ‘ora.LISTENER_SCAN3.lsnr’ on ‘paw-racnode1’ succeeded

CRS-2676: Start of ‘ora.LISTENER_SCAN2.lsnr’ on ‘paw-racnode1’ succeeded

CRS-2677: Stop of ‘ora.OCR_DG.dg’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.VOTE_DG.dg’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.racdb.db’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.DATA.dg’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.FRA.dg’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.FRA.dg’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.DATA.dg’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.asm’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.asm’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.eons’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.ons’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.ons’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.net1.network’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.net1.network’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.eons’ on ‘paw-racnode2’ succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘paw-racnode2’ has completed

CRS-2677: Stop of ‘ora.crsd’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.evmd’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.asm’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.drivers.acfs’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.mdnsd’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.ctssd’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.evmd’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.drivers.acfs’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.asm’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.cssd’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.cssd’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘paw-racnode2’

CRS-2673: Attempting to stop ‘ora.diskmon’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.gpnpd’ on ‘paw-racnode2’ succeeded

CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘paw-racnode2’

CRS-2677: Stop of ‘ora.gipcd’ on ‘paw-racnode2’ succeeded

CRS-2677: Stop of ‘ora.diskmon’ on ‘paw-racnode2’ succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘paw-racnode2’ has completed

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

Step 3: Start the crs:

[root@paw-racnode2 peer]# crsctl start crs

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

Step 4: Check whether pending.xml created:

[root@paw-racnode2 peer]# ll

total 16

-rw-r–r– 1 grid oinstall 1905 Nov 28 17:14 pending.xml

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:05 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 14:05 profile_orig.xml

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.xml

Step5: Check after some time, whether pending.xml exist:

 [root@paw-racnode2 peer]# ll

total 12

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:05 profile.old

-rw-r–r– 1 grid oinstall 1839 Aug  7 14:05 profile_orig.xml

-rw-r–r– 1 grid oinstall 1905 Aug  7 14:14 profile.xml

Attached Image to justify My Practical:

 gpnp2

Final Conclusion: GPnPd always creates pending.xml, whether profile.xml exist or not. This pending.xml automatically disappears, when all services and resources of cluster comes up.

Thank you for Reading…This is AIRY…Enjoy Learning :)

#gpnp, #gpnptool

GPnP ( Grid plug n play ) profile in Oracle 11g R2/12c RAC

GPnP ( Grid plug n play ) profile in Oracle 11g R2/12c RAC :

What is GPnP profile and Why it is needed?

With reference to my OCR and Voting Disk Blog post, In Oracle 11g R2 RAC, we can store OCR and Voting disk in ASM, but clusterware needs OCR and Voting disk to start CRSD and CSSD process but point is, both OCR and Voting disk are stored in ASM, which itself  is a resource for the nodes that means CRSD and CSSD process needs the OCR and Voting file before the ASM startup. So the question arise ” how the clusterware will start?”, we shall find the answer of this question in this same document, just wait..

To resolve this issue Oracle introduced two new node specific files OLR & GPnP, in Oracle 11g R2.

Now If we talk about GPnP profile, This GPnP profile is a new feature included in Oracle 11g R2.The GPnP profile is a small XML file located in

$GRID_HOME/gpnp//profiles/peer with name profile.xml.   

gpnp1

Each node of the cluster maintains a local copy of this profile and is maintained by GPnP daemon along with mdns daemon . GPnP deamon ensures the synchronization of  GPnP profile across all the nodes in the cluster and GPnP profile is used by clusterware to establish the correct global personality of a node. it cannot be stored on ASM as it is required prior to start of ASM. Hence, it is stored locally on each node and is kept synchronized across all the nodes by GPnPd.

How does GPnP Profile used ?:

When a node of an Oracle Clusterware cluster restarts, OHASD is started by platform-specific means, OHASD has access to the OLR (Oracle Local Registry) stored on the local file system. OLR provides needed data to complete OHASD initialization. OHASD brings up GPnP Daemon and CSS Daemon. CSS Daemon has access to the GPNP Profile stored on the local file system. The information regarding voting disk is on ASM , is read from GPnP profile i.e. 

We can even read voting disk by using kfed utility ,even if ASM is not up.

In next step, the clusterware checks whether all the nodes have the updated GPnP profile and the nodes joins the cluster based on the GPnP configuration . Whenever a node is started or added to the cluster, the clusterware software on the starting node starts a GPnP agent and perform following task.

  1. If the node is already part of the cluster, the GPnP agent reads the existing profile on that node.
  2. If the node is being added to the cluster, GPnP agent locates agent on another existing node using multicast protocol (provided by mDNS) and gets the profile from other node’s GPnP agent.

The Voting Files locations on ASM Disks are accessed by CSSD with well-known pointers in the ASM Disk headers and CSSD is able to complete initialization and start or join an existing cluster.

Now OHASD starts an ASM instance and ASM can now operate with initialized and operating CSSD.

With, an ASM instance running and its Diskgroup mounted, access to Clusterware’s OCR is available to CRSD (CRSD needs to read OCR to startup various resources on the node and hence update it, as status of resources changes )Now OHASD starts CRSD with access to the OCR in an ASM Diskgroup and thus Clusterware completes initialization and brings up other services under its control.

The ASM instance uses special code to locate the contents of the ASM SPFILE , which is stored in a Diskgroup.

Next. Since OCR is also on ASM, location of ASM spfile should be known. The order of searching the ASM SPfile is

  • GPnP profile
  • ORACLE_HOME/dbs/spfile
  • ORACLE_HOME/dbs/init

ASM spfile is stored in ASM. But to start ASM, we’ll need spfile.  Oracle know spfile  location from GPnP profile & it reads spfile flag from underlying disk(s) and then starts the ASM.

Thus with the use of GPnP profile stores several information. GPnP profile information along with the information in the OLR have enough information , that have sufficient to automate several tasks or eased for the administrators and also the dependency on OCR is gradually reduced but not eliminated.

 What Information GPnP Profile Contains:

GPnP profile defines a node’s metadata about:

  • Cluster Name
  • Network interfaces for public and private interconnect
  • ASM server parameter file Location and ASM Diskstring etc.
  • CSS voting disks Discovery String
  • Digital Signature Information

it contains digital signature information of the provisioning authority because the profile is security sensitive. It might identify the storage to be used as the root partition of a machine. This profile is protected by a wallet against modification. As in my case the WALLET information can be found in : /u01/app/11.2.0/grid/gpnp/paw-racnode1/wallets/peer  “OR” /u01/app/11.2.0/grid/gpnp/wallets/peer .

If you have to manually modify the profile, it must first be unsigned with $GRID_HOME/bin/gpnptool, modified, and then signed again with the same utility, however there is a very slight chance you would ever be required to do so.

Now we can use the gpnptool with get option to dump this xml file into standard output. Below is the formatted output .

[grid@paw-racnode1 peer]$ pwd

/u01/app/11.2.0/grid/gpnp/paw-racnode1/profiles/peer

[grid@paw-racnode1 peer]$ gpnptool get

Warning: some command line parameters were defaulted. Resulting command line:

         /u01/app/11.2.0/grid/bin/gpnptool.bin get -o-

<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”5″ ClusterUId=”1c12005940a3efa8bf244ccd47060927″ ClusterName=”paw-rac-cluster PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.75.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”10.0.0.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile><orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/oracleasm/disks” SPFile=”+DATA/paw-rac-cluster/asmparameterfile/registry.253.919259819″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>HIz8dOjUIFB32YPkmXW2HMVazoY=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>L6GOD0rB03Hp+NoKVcIHb9/Rp3xznBKpUJGfixN/27Qo6IL8/4HkjSnzsbHf1IuK1SQfqV5624tygB0x9HJfVcW+k6E6cQWwAgZOzpPR3ltctD7XeikkXtt5TOWQ6boMvCKJ5mOwzGzuj4S/qDu7lWPBHM9EPzHAEn/8NOlDcDo=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>

Success.

Who and When GPNP PROFILE UPDATES? :

GPnP daemon replicates changes to the profile during

  • installation
  • system boot
  • when system updated using standard cluster tools

Profile is automatically updated Whenever changes are made to a cluster during installation and with configuration tools like

  • oifcfg (Change network),
  • crsctl (change location of voting disk),
  • asmcmd (change ASM_DISKSTRING, spfile location) etc.

I hope the above information will help you to understand the Grid plug and play ( GPnP ) profile.
gpnptool Commands to access GPnP Profile:

 [grid@paw-racnode1 peer]$ pwd

/u01/app/11.2.0/grid/gpnp/paw-racnode1/profiles/peer

[grid@paw-racnode1 peer]$ gpnptool get

Warning: some command line parameters were defaulted. Resulting command line:

         /u01/app/11.2.0/grid/bin/gpnptool.bin get -o-

<?xml version=”1.0″ encoding=”UTF-8″?><gpnp:GPnP-Profile Version=”1.0″ xmlns=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:gpnp=”http://www.grid-pnp.org/2005/11/gpnp-profile” xmlns:orcl=”http://www.oracle.com/gpnp/2005/11/gpnp-profile” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.grid-pnp.org/2005/11/gpnp-profile gpnp-profile.xsd” ProfileSequence=”5″ ClusterUId=”1c12005940a3efa8bf244ccd47060927″ ClusterName=”paw-rac-cluster PALocation=””><gpnp:Network-Profile><gpnp:HostNetwork id=”gen” HostName=”*”><gpnp:Network id=”net1″ IP=”192.168.75.0″ Adapter=”eth0″ Use=”public”/><gpnp:Network id=”net2″ IP=”10.0.0.0″ Adapter=”eth1″ Use=”cluster_interconnect”/></gpnp:HostNetwork></gpnp:Network-Profile><orcl:CSS-Profile id=”css” DiscoveryString=”+asm” LeaseDuration=”400″/><orcl:ASM-Profile id=”asm” DiscoveryString=”/dev/oracleasm/disks” SPFile=”+DATA/paw-rac-cluster/asmparameterfile/registry.253.919259819″/><ds:Signature xmlns:ds=”http://www.w3.org/2000/09/xmldsig#”><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”/><ds:SignatureMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#rsa-sha1″/><ds:Reference URI=””><ds:Transforms><ds:Transform Algorithm=”http://www.w3.org/2000/09/xmldsig#enveloped-signature”/><ds:Transform Algorithm=”http://www.w3.org/2001/10/xml-exc-c14n#”> <InclusiveNamespaces xmlns=”http://www.w3.org/2001/10/xml-exc-c14n#” PrefixList=”gpnp orcl xsi”/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=”http://www.w3.org/2000/09/xmldsig#sha1″/><ds:DigestValue>HIz8dOjUIFB32YPkmXW2HMVazoY=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue>L6GOD0rB03Hp+NoKVcIHb9/Rp3xznBKpUJGfixN/27Qo6IL8/4HkjSnzsbHf1IuK1SQfqV5624tygB0x9HJfVcW+k6E6cQWwAgZOzpPR3ltctD7XeikkXtt5TOWQ6boMvCKJ5mOwzGzuj4S/qDu7lWPBHM9EPzHAEn/8NOlDcDo=</ds:SignatureValue></ds:Signature></gpnp:GPnP-Profile>

Success.

[grid@paw-racnode1 peer]$ gpnptool getpval -asm_spf

Warning: some command line parameters were defaulted. Resulting command line:

         /u01/app/11.2.0/grid/bin/gpnptool.bin getpval -asm_spf -p=profile.xml -o-

+DATA/paw-rac-cluster/asmparameterfile/registry.253.919259819

 [grid@paw-racnode1 peer]$ gpnptool getpval -asm_dis

Warning: some command line parameters were defaulted. Resulting command line:

         /u01/app/11.2.0/grid/bin/gpnptool.bin getpval -asm_dis -p=profile.xml -o-

/dev/oracleasm/disks

[grid@paw-racnode1 peer]$ gpnptool find

 Found 2 instances of service ‘gpnp’.

        mdns:service:gpnp._tcp.local.://paw-racnode2:64098/agent=gpnpd,cname=paw-rac-cluster,host=paw-racnode2,pid=6444/gpnpd h:paw-racnode2 c:paw-rac-cluster

        mdns:service:gpnp._tcp.local.://paw-racnode1:55790/agent=gpnpd,cname=paw-rac-cluster,host=paw-racnode1,pid=6677/gpnpd h:paw-racnode1 c:paw-rac-cluster

I hope the above information will help you to understand the Grid plug and play ( GPnP ) profile.

Thank you for Reading…This is AIRY…Enjoy Learning :)

 

 

#gpnp, #rac

Important Frequently Asked RAC Interview Questions Set-1

Click on below given link to download the document: 

Important_Frequently_Asked_RAC_Interview_Questions-Set-1

Password For Opening Document : Airydba@159

Many More Oracle RAC Interview Questions And Answers are Coming Soon…Be in Touch ……………..

Thank you for Reading…This is AIRY…Enjoy Learning :)

#oracle-rac-interview-questions

Oracle Database creation For RAC-Airy’s Notes:

Click on Below given link to get the step by step Oracle-Database-Creation-For-RAC.

Step-8-Oracle-Database-Creation-For-RAC

Password for opening the document is : Airydba@159

Thank you for reading… This is Airy…Enjoy Learning:)

Oracle Software Installation For RAC – Airy’s Notes:

Click on Below given link to get the step by step Oracle-Software-Installation-For-RAC.

Step-7-RAC-Oracle-SW-Installation

Password for opening the document is : Airydba@159

Thank you for reading… This is Airy…Enjoy Learning:)

Grid Infrastructure Installation For RAC – Airy’s Notes:

Click on Below given link to get the step by step Grid-Infrastructure-Installation-For-RAC.

Step-6-Grid-Infrastructure-Installation-For-RAC

Password for opening the document is : Airydba@159

Thank you for reading… This is Airy…Enjoy Learning:)

ASM-Disks-Creation For RAC- Airy’s Notes

ASM Disks Creation for RAC:

[root@paw-racnode1 ~]# chown oracle:oinstall /dev/sd[b-k]

 [root@paw-racnode1 ~]# vi /etc/rc.d/rc.local

 [root@paw-racnode1 ~]# fdisk -l                                       

Disk /dev/sda: 53.6 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        1318    10482412+  83  Linux

/dev/sda3            1319        1840     4192965   83  Linux

/dev/sda4            1841        6527    37648327+   5  Extended

/dev/sda5            1841        5952    33029608+  83  Linux

/dev/sda6            5953        6527     4618656   82  Linux swap / Solaris


Disk /dev/sdb: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdb doesn't contain a valid partition table


Disk /dev/sdc: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdc doesn't contain a valid partition table


Disk /dev/sdd: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdd doesn't contain a valid partition table


Disk /dev/sde: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sde doesn't contain a valid partition table


Disk /dev/sdf: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdf doesn't contain a valid partition table


Disk /dev/sdg: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdg doesn't contain a valid partition table


Disk /dev/sdh: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdh doesn't contain a valid partition table


Disk /dev/sdi: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdi doesn't contain a valid partition table


Disk /dev/sdj: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdj doesn't contain a valid partition table


Disk /dev/sdk: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


Disk /dev/sdk doesn't contain a valid partition table

————————————————————————–

[root@paw-racnode1 ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

 [root@paw-racnode1 ~]# fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdd

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sde

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdf

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdg

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdh

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdi

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdj

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]# fdisk /dev/sdk

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.


Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)


Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1009, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-1009, default 1009):

Using default value 1009


Command (m for help): w

The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@paw-racnode1 ~]#partprobe

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.

 [root@paw-racnode1 ~]# fdisk -l

Disk /dev/sda: 53.6 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        1318    10482412+  83  Linux

/dev/sda3            1319        1840     4192965   83  Linux

/dev/sda4            1841        6527    37648327+   5  Extended

/dev/sda5            1841        5952    33029608+  83  Linux

/dev/sda6            5953        6527     4618656   82  Linux swap / Solaris


Disk /dev/sdb: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1009     2095662   83  Linux


Disk /dev/sdc: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdc1               1        1009     2095662   83  Linux


Disk /dev/sdd: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdd1               1        1009     2095662   83  Linux


Disk /dev/sde: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sde1               1        1009     2095662   83  Linux


Disk /dev/sdf: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdf1               1        1009     2095662   83  Linux


Disk /dev/sdg: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdg1               1        1009     2095662   83  Linux


Disk /dev/sdh: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdh1               1        1009     2095662   83  Linux


Disk /dev/sdi: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdi1               1        1009     2095662   83  Linux


Disk /dev/sdj: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdj1               1        1009     2095662   83  Linux


Disk /dev/sdk: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdk1               1        1009     2095662   83  Linux

————————————————————————–

[root@paw-racnode2 ~]# partprobe

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.

[root@paw-racnode2 ~]# fdisk -l

Disk /dev/sda: 53.6 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        1318    10482412+  83  Linux

/dev/sda3            1319        1840     4192965   83  Linux

/dev/sda4            1841        6527    37648327+   5  Extended

/dev/sda5            1841        5952    33029608+  83  Linux

/dev/sda6            5953        6527     4618656   82  Linux swap / Solaris


Disk /dev/sdb: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1009     2095662   83  Linux


Disk /dev/sdc: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdc1               1        1009     2095662   83  Linux


Disk /dev/sdd: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdd1               1        1009     2095662   83  Linux


Disk /dev/sde: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sde1               1        1009     2095662   83  Linux


Disk /dev/sdf: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdf1               1        1009     2095662   83  Linux


Disk /dev/sdg: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdg1               1        1009     2095662   83  Linux


Disk /dev/sdh: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdh1               1        1009     2095662   83  Linux


Disk /dev/sdi: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdi1               1        1009     2095662   83  Linux


Disk /dev/sdj: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdj1               1        1009     2095662   83  Linux


Disk /dev/sdk: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdk1               1        1009     2095662   83  Linux

————————————————————————

[root@paw-racnode3 ~]# partprobe

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.

[root@paw-racnode3 ~]# fdisk -l

Disk /dev/sda: 53.6 GB, 53687091200 bytes

255 heads, 63 sectors/track, 6527 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        1318    10482412+  83  Linux

/dev/sda3            1319        1840     4192965   83  Linux

/dev/sda4            1841        6527    37648327+   5  Extended

/dev/sda5            1841        5952    33029608+  83  Linux

/dev/sda6            5953        6527     4618656   82  Linux swap / Solaris


Disk /dev/sdb: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1009     2095662   83  Linux


Disk /dev/sdc: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdc1               1        1009     2095662   83  Linux


Disk /dev/sdd: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdd1               1        1009     2095662   83  Linux


Disk /dev/sde: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sde1               1        1009     2095662   83  Linux


Disk /dev/sdf: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdf1               1        1009     2095662   83  Linux


Disk /dev/sdg: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdg1               1        1009     2095662   83  Linux


Disk /dev/sdh: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdh1               1        1009     2095662   83  Linux


Disk /dev/sdi: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdi1               1        1009     2095662   83  Linux


Disk /dev/sdj: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdj1               1        1009     2095662   83  Linux


Disk /dev/sdk: 2147 MB, 2147483648 bytes

67 heads, 62 sectors/track, 1009 cylinders

Units = cylinders of 4154 * 512 = 2126848 bytes


   Device Boot      Start         End      Blocks   Id  System

/dev/sdk1               1        1009     2095662   83  Linux

————————————————————————

[root@paw-racnode1 RPM]# oracleasm configure -i

Configuring the Oracle ASM library driver.


This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting  without typing an

answer will keep that current value.  Ctrl-C will abort.


Default user to own the driver interface []: grid

Default group to own the driver interface []: asmadmin

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm

Loading module "oracleasm": oracleasm

Mounting ASMlib driver filesystem: /dev/oracleasm

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK1 /dev/sdb1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK2 /dev/sdc1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK3 /dev/sdd1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK4 /dev/sde1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK5 /dev/sdf1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK6 /dev/sdg1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK7 /dev/sdh1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK8 /dev/sdi1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK9 /dev/sdj1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm createdisk ASMDISK10 /dev/sdk1

Writing disk header: done

Instantiating disk: done

[root@paw-racnode1 RPM]# /usr/sbin/oracleasm listdisks

ASMDISK1

ASMDISK10

ASMDISK2

ASMDISK3

ASMDISK4

ASMDISK5

ASMDISK6

ASMDISK7

ASMDISK8

ASMDISK9

————————————————————————–

[root@paw-racnode2 RPM]# oracleasm configure -i

Configuring the Oracle ASM library driver.


This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting  without typing an

answer will keep that current value.  Ctrl-C will abort.


Default user to own the driver interface []: grid

Default group to own the driver interface []: asmadmin

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

[root@paw-racnode2 RPM]# /usr/sbin/oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm

Loading module "oracleasm": oracleasm

Mounting ASMlib driver filesystem: /dev/oracleasm

[root@paw-racnode2 RPM]# /usr/sbin/oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

Instantiating disk "DISK1"

Instantiating disk "DISK2"

Instantiating disk "DISK3"

Instantiating disk "DISK4"

Instantiating disk "DISK5"

Instantiating disk "DISK6"

Instantiating disk "DISK7"

Instantiating disk "DISK8"

Instantiating disk "DISK9"

Instantiating disk "DISK10"

 [root@paw-racnode2 RPM]# /usr/sbin/oracleasm listdisks

DISK1

DISK10

DISK2

DISK3

DISK4

DISK5

DISK6

DISK7

DISK8

DISK9

————————————————————————–

[root@paw-racnode3 RPM]# oracleasm configure -i

Configuring the Oracle ASM library driver.


This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting  without typing an

answer will keep that current value.  Ctrl-C will abort.


Default user to own the driver interface []: grid

Default group to own the driver interface []: asmadmin

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

[root@paw-racnode3 RPM]# /usr/sbin/oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm

Loading module "oracleasm": oracleasm

Mounting ASMlib driver filesystem: /dev/oracleasm

[root@paw-racnode3 RPM]# /usr/sbin/oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

Instantiating disk "DISK1"

Instantiating disk "DISK2"

Instantiating disk "DISK3"

Instantiating disk "DISK4"

Instantiating disk "DISK5"

Instantiating disk "DISK6"

Instantiating disk "DISK7"

Instantiating disk "DISK8"

Instantiating disk "DISK9"

Instantiating disk "DISK10"

[root@paw-racnode3 RPM]# /usr/sbin/oracleasm listdisks

DISK1

DISK10

DISK2

DISK3

DISK4

DISK5

DISK6

DISK7

DISK8

DISK9

Now ASM disk creation on all Nodes completed.

Thank you for reading… This is Airy…Enjoy Learning:)

 

Voting Disk in Oracle 11g R2 RAC–Airy’s Notes

Voting Disk in Oracle11g R2 RAC :                                  

  1. The voting disk is a shared area that Oracle Clusterware uses to verify cluster node membership and status. Voting disk maintains the node membership information by collecting the heartbeats of all nodes in the cluster periodically.
  1. The voting disk must reside on ASM OR shared disk(s) that is accessible by all of the nodes in the cluster. After ASM is introduced to store these files, these are called as VOTING FILE.
  1. CSSD process is responsible for collecting the heartbeats and recording them in to the voting disk.
  1. CSSD of the individual nodes registers the information regarding their nodes in the voting disk and with that pwrite() system call at a specific offset and then a pread() system call to read the status of other CSSD processes.
  1. Oracle Clusterware uses the voting disk to determine which instances are members of a cluster by way of a health check and arbitrates cluster ownership among the instances in case of network failures.
  1. For high availability, Oracle recommends that you have multiple voting disks.
  1. In 10g, Oracle Clusterware can supports 32 voting disks but in Oracle Clusterware 11gR2 can supports only 15 voting disks. Oracle recommends minimum of 3 and maximum of 5. If you define a single voting disk, then you should use external mirroring to provide redundancy.
  1. Oracle Clusterware can be configured to maintain multiple voting disks (multiplexing) but you must have an odd number of voting disks, such as three, five, and so on.
  1. A node must be able to access more than half of the voting disks at any time. For example, if you have 5 voting disks configured, then a node must be able to access at least 3 of the voting disks at any time. If a node cannot access the minimum required number of voting disks it is evicted, or removed, from the cluster. After the cause of the failure has been corrected and access to the voting disks has been restored, you can instruct Oracle Clusterware to recover the failed node and restore it to the cluster.
  1. As information regarding the nodes also exist in OCR/OLR and system calls have nothing to do with previous calls, there is not any useful data kept in the voting disk except hear beats. So, if you lose voting disks, you can simply add them back without losing any data. But, of course, losing voting disks can lead to node reboots.
  1. If you lose all voting disks, then you will have to keep the CRS daemons down, then only you can add the voting disks. Now that we have understood both the heartbeats which was the most important part, we cluster keep it into the Voting Disk/Files
  1. All nodes in the RAC cluster register their heartbeat information in the voting disks/files. RAC  heartbeat is the polling mechanism that is sent over the cluster interconnect to ensure all RAC nodes are available.
  1. The primary function of the voting disk is to manage node membership and prevent what is known as Split Brain Syndrome in which two or more instances attempt to control the RAC database. This can occur in cases where there is a break in communication between nodes through the interconnect.

Now finally to understand the whole concept of voting disk we need to know What Type of Data Voting Disk consists, what is Voting, How Voting Happens, What is I/O Fencing, What is NETWORK and DISK HEARTBEAT,what is split brain syndrome and concept of simple majority rule.

What Type of Data Voting Disk consists?

Voting disk consists of two types of data:

  1. Static data: Information about the nodes in cluster.
  2. Dynamic data: Disk heartbeat logging.

Voting Disk/Files contains the important details of the cluster nodes membership like:

  1. Node membership information.
  2. Heartbeat information of all nodes in the cluster.
  3. How many nodes in the cluster.
  4. Who is joining the cluster?
  5. Who is leaving the cluster?

What is Voting in Cluster Environment:

  1. The CGS (Cluster Group Services)is responsible for checking whether members are valid.
  2. To determine periodically whether all members are alive, a voting mechanism is used to check the validity of each member.
  3. All members in the database group vote by providing details of what they presume the instance membership bitmap looks like andthe bitmap is stored in the GRD (Global Resource Directory).
  4. A predetermined master member tallies the vote flags of the status flag and communicates to the respective processes that the voting is done; then it waits for registration by all the members who have received the reconfigured bitmap.

How Voting Happens in Cluster Environment:

  1. The CKPT process updates the control file every 3 seconds in an operation known as the heartbeat.
  2. CKPT writes into a single block that is unique for each instance, thus intra-instance coordination is not required. This block is called the checkpoint progress record.
  3. All members attempt to obtain a lock on a control file record (the result record) for updating.
  4. The instance that obtains the lock tallies the votes from all members.
  5. The group membership must conform to the decided (voted) membership before allowing the GCS/GES (Global Enqueue Service) reconfiguration to proceed.
  6. The control file vote result record is stored in the same block as the heartbeat in the control file checkpoint progress record.

What is I/O Fencing in Cluster Environment?

  1. There will be some situation where the leftover write operations from failed database instances (The cluster function failed on the nodes, but the nodes are still running at OS level) reach the storage system after the recovery process starts.
  2. Since these write operations are no longer in the proper serial order, they can damage the consistency of the data stored data.
  3. Therefore when a cluster node fails, the failed node needs to be fenced off from all the shared disk devices or disk groups. This methodology is called I/O fencing or failure fencing.
  4. I/O fencing implementation is a function of CM and depends on the clusterware vendor.
  5. I/O fencing is designed to guarantee data integrity in the case of faulty cluster communications causing a split-brain condition.

Why Voting disk is essential and needed:

The Voting Disk Files are used for overall health check,by the Oracle Clusterware.

  1. Voting disk Files is used by CSS to determine which nodes are currently members of the cluster.
  2. In concert with other Cluster components such as CRS to shut down, fence, or reboot either single or multiple nodes whenever network communication is lost between any nodes within the cluster, in order to prevent the dreaded split-brain condition in which two or more instances attempt to control the RAC database. It thus protects the database information.
  3. Voting disk will be used by the CSS daemon to arbitrate with peers that it cannot see over the private interconnect in the event of an outage, allowing it to salvage the largest fully connected sub cluster for further operation.
  4. It checks the voting disk to determine if there is a failure on any other nodes in the cluster. During this operation, NM (Node Monitor) will make an entry in the voting disk to inform its vote on availability. Similar operations are performed by other instances in the cluster.
  5. The three voting disks configured also provide a method to determine who in the cluster should survive. For example, if eviction of one of the nodes is necessitated by an unresponsive action, then the node that has two voting disks will start evicting the other node. NM (Node Monitor) alternates its action between the heartbeat and the voting disk to determine the availability of other nodes in the cluster.

What is NETWORK and DISK HEARTBEAT and how it registers in VOTING DISKS/FILES?

 All nodes in the RAC cluster register their heartbeat information in the voting disks/files.  AC heartbeat is the polling mechanism that is sent over the cluster interconnect to ensure all nodes are available.Voting disks/files are just like attendance register where you have nodes mark their attendance (heartbeats).

1: NETWORK HEARTBEAT:

Network heartbeat is across the interconnect. CSSD process on every node makes entries in the voting disk to ascertain the membership of the node, by the way in every second CSSD process sends a thread (sending) of CSSD i.e anetwork TCP heartbeat to itself and all other nodes, another thread (receiving) of CSSD receives the heartbeat. That means while marking their own presence, all the nodes also register the information about their communicability with other nodes in the voting disk. This is called NETWORK HEARTBEAT.If the network packets are dropped or has error, the error correction mechanism on TCP would re-transmit the package, Oracle does not re-transmit in this case. In the CSSD log, you will see a WARNING message about missing of heartbeat if a node does not receive a heartbeat from another node for 15 seconds (50% of misscount). Another warning is reported in CSSD log if the same node is missing for 22 seconds (75% of misscount) and similarly at 90% of misscount and when the heartbeat is missing for a period of 100% of the misscount (i.e. 30 seconds by default), the node is evicted.

Hertbeat-Voting-Disk

2: DISK HEARTBEAT:

Disk heartbeat is between the cluster nodes and the voting disk. CSSD process in each RAC node maintains a heartbeat in a block of size 1 OS block in a specific offset by read/write system calls (pread/pwrite), in the voting disk. In addition to maintaining its own disk block, CSSD processes also monitors the disk blocks maintained by the CSSD processes running in other cluster nodes. The written block has a header area with the node name and a counter which is incremented with every next beat (pwrite) from the other nodes. Disk heart beat is maintained in the voting disk by the CSSD processes and If a node has not written a disk heartbeat within the I/O timeout, the node is declared dead. Nodes that are of an unknown state, i.e. cannot be definitively said to be dead, and are not in the group of nodes designated to survive, are evicted, i.e. the node’s kill block is updated to indicate that it has been evicted.In this case, a message to this effect is written in the KILL BLOCK of node. Each nodes reads its KILL BLOCK once per second/beat, if the kill block is not overwritten, node commits suicide.

During reconfig (leaving or joining), CSSD monitors all nodes heartbeat information and determines whether the nodes has a disk heartbeat including those with no network heartbeat.  If no disk heartbeat is detected, then node is considered as dead.

Thus summarizing the heartbeats, N/W Heartbeat is pinged every second, nodes must respond in css_misscount time, failure would lead to node eviction. Similarly Disk Heartbeat, node pings (r/w) voting disk every second, nodes must receive a response in (long/short) disk timeout time.

What are the different possibilities of individual heartbeat failures?

As we know voting disk is the key communication mechanism within the Oracle Clusterware where all nodes in the cluster read and write heartbeat information. Break in heart beat indicates a possible error scenario. There are few different scenarios possible with missing heart beats:

  1. Network heart beat is successful, but disk heart beat is missed.
  2. Disk heart beat is successful, but network heart beat is missed.
  3. Both heart beats failed.

In addition, with numerous nodes, there are other possible scenarios too. Few possible scenarios:

  1. Nodes have split in to N sets of nodes, communicating within the set, but not with members in other set.
  2. Just one node is unhealthy.

Nodes with quorum will maintain active membership of the cluster and other node(s) will be fenced/rebooted.

Misscount Parameter: The CSS misscount parameter represents the maximum time, in seconds, that a network heartbeat can be missed before entering into a cluster reconfiguration to evict the node.

For NETWORK HEARTBEAT: That means CSSmisscount parameter determines network heartbeat, defaults to 30 seconds. Disk timeout is 200 seconds.If network heartbeat is missed after a timeout of 30 seconds, reboot is initiated (approximately, it is 34 seconds). It doesn’t matter what happens with disk heartbeat.

For DISK HEARTBEAT (Voting Disk): If the heartbeat did not complete in 200 seconds then the node will be rebooted.If the disk heartbeat completes under 200 seconds,then the reboot will not happen as long as network heartbeat is successful.This is little bit different at cluster reconfiguration time.

By default Misscount is less than Disktimeout seconds.

Also, if there is a vendor clusterware in play, then misscount is set to 600.

The following are the default values in seconds for the misscount parameter and their respective versions when using Oracle Clusterware:

Operating System RAC Oracle 10g R1 and R2 Oracle 11g R1 and R2
Windows 30 30
Linux 60 30
Unix 30 30
VMS 30 30

Below given table will also provide you the different possibilities of individual heartbeat failures on the basis of misscount.

Network Ping Disk Ping Reboot
Completes within misscount seconds Completes within Misscount seconds N
Completes within Misscount seconds Takes more than misscount seconds but less than Disktimeout seconds N
Completes within Misscount seconds Takes more than Disk timeout seconds Y
Takes more than Misscount Seconds Completes within Misscount seconds Y

What is Split Brain Condition or syndrome in cluster Environment?

  1. A split-brain occurs when cluster nodes hang or node interconnects fail, and as a result, the nodes lose the communication link between them and the cluster.
  1. Split-brain is a problem in any clustered environment and is a symptom of clustering solutions and not RAC.
  1. Split-brain conditions can cause database corruption when nodes become uncoordinated in their access to the shared data files.
  1. For a two-node cluster, split-brain occurs when nodes in a cluster cannot talk to each other (the internode links fail) and each node assumes it is the only surviving member of the cluster. If the nodes in the cluster have uncoordinated access to the shared storage area, they would end up overwriting each other’s data, causing data corruption because each node assumes ownership of shared data.
  1. To prevent data corruption, one node must be asked to leave the cluster or should be forced out immediately. This is where IMR (Instance Membership Recovery)comes in.
  1. Many internal (hidden) parameters control IMR (Instance Membership Recovery)and determine when it should start.
  2. If a vendor clusterware is used, split-brain resolution is left to it and Oracle would have to wait for the clusterware to provide a consistent view of the cluster and resolve the split-brain issue. This can potentially cause a delay (and a hang in the whole cluster) because each node can potentially think it is the master and try to own all the shared resources. Still, Oracle relies on the clusterware for resolving these challenging issues.
  1. Note that Oracle does not wait indefinitely for the clusterware to resolve a split-brain issue, but a timer is used to trigger an IMR-based node eviction. Theseinternal timers are also controlled using hidden parameters. The default values of these hidden parameters are not to be touched as that can cause severe performance or operational issues with the cluster.
  1. As mentioned time and again, Oracle completely relies on the cluster software to provide cluster services, and if something is awry, Oracle, in its overzealous quest to protect data integrity, evicts nodes or aborts an instance and assumes that something is wrong with the cluster.

Split Brain Syndrome in Oracle RAC:

In an Oracle RAC environment all the instances/servers communicate with each other using high-speed interconnects on the private network. This private network interface or interconnect are redundant and are only used for inter-instance oracle data block transfers. Now talking about split-brain concept with respect to oracle RAC systems, it occurs when the instance members in a RAC fail to ping/connect to each other via this private interconnect, but the servers are all physically up and running and the database instance on each of these servers is also running. These individual nodes are running fine and can conceptually accept user connections and work independently. So basically due to lack of communication the instance thinks that the other instance that it is not able to connect is down and it needs to do something about the situation. The problem is if we leave these instances running, the same block might get read, updated in these individual instances and there would be data integrity issue, as the blocks changed in one instance, will not be locked and could be over-written by another instance. This situation is termed as Split Brain Syndrome.

Split-Brain-Syndrom

Now in givenPicture, In case of 3 Node cluster and in case of a network error, a Split-Brain problem would occur – without a Voting Disk. Suppose node1 has lost the network connection to the Interconnect. Here, node1 cannot use the Interconnect anymore. It can still access the Voting Disk, though. Nodes 2 and 3 see their heartbeats still but no longer node1, which is indicated by the green Vs and red fs in the picture. The node with the network problem gets evicted by placing the Poison Pill into the Voting File for node1. CSSD of node1 will commit suicide now and leave the cluster.

Simple Majority win Rule:

According to Oracle – “An absolute majority of voting disks configured (more than half) must be available and responsive at all times for Oracle Cluster ware to operate.” Which means to survive from loss of ‘N’ voting disks, you must configure atleast ‘2N+1′ voting disks.

That means a node must be able to access more than half of the voting disks at any time. 

Example1: Suppose we have a 2 node cluster with an even number of voting disks, let’s say 2 voting disks. Let Node1 is able to access voting disk1 and Node2 is able to access voting disk2. This means that there is no common file where clusterware can check the heartbeat of both the nodes.  Hence, if we have 2 voting disks, all the nodes in the cluster should be able to access both the voting disks.

Example 2:If we have 3 voting disks and both the nodes are able to access more than half i.e. 2 voting disks, there will be at least on disk which will be accessible by both the nodes. The clusterware can use that disk to check the heartbeat of both the nodes. Hence, each node should be able to access more than half the number of voting disks.A node not able to do so will have to be evicted from the cluster to maintain the integrity of the cluster. After the cause of the failure has been corrected and access to the voting disks has been restored, you can instruct Oracle clusterware to recover the failed node and restore it to the cluster.

 Loss of more than half your voting disks will cause the entire cluster to fail.

Example 3:Suppose in a 3 node cluster with 3 voting disks, a network heartbeat fails between Node 1 and Node 3 & Node 2 and Node 3 whereas Node 1 and Node 2 are able to communicate via interconnect, and from the Voting Disk CSSD notices that all the nodes are able to write to Voting Disks thus split brain, so the healthy nodes Node 1 & Node 2 would update the kill block in the voting disk for Node 3.

Voting-Disk-Example3

Then when during pread() system call of CSSD of Node 3, it sees a self-kill flag set and thus the CSSD of Node 3 evicts itself. And then the I/O fencing and finally the OHASD will finally attempt to restart the stack after graceful shutdown.

 Example 4: Suppose in a 2 node cluster with 3 voting disk, a disk heartbeat fails such that Node 1 can see 2 Voting Disks and Node 2 can see 1 Voting Disk, ( If here the Voting Disk wouldn’t have been odd then both the Nodes would have thought the other node should be killed hence would have been difficult to avoid split-brain), thus based on Simple Majority Rule, CSSD process of Node 1 (2 Voting Disks) sends a kill request to the CSSD process of Node 2 (1 Voting Disk) and thus the Node 2 evicts itself and then the I/O fencing and finally the OHASD will finally attempt to restart the stack after graceful shutdown.

That’s why voting disks are configured in odd Numbers.

A node in the cluster must be able to access more than half of the voting disks at any time in order to be able to tolerate a failure of n voting disks. Therefore, it is strongly recommended that you configure an odd number of voting disks such as 3, 5, and so on.

Here is a table which represents the number of voting disks whose failure can be tolerated for different numbers of voting disks:

 Total Voting Disks No. of voting disks Which should be accessible Whose failure can be tolerated
1 1 0
2 2 0
3 2 1
4 3 1
5 3 2
6 4 2

It can be seen that number of voting disks whose failure can be tolerated is same for (2n-1) as well as 2n voting disks where n can be 1, 2 or 3. Hence to save a redundant voting disk, (2n-1) i.e. an odd number of voting disks are desirable.

Thus Voting disk/File plays a role in both the heartbeat failures, and hence a very important file for node eviction & I/O fencing in case of a split brain situation.

Storage Mechanism of Voting Disk/Files:

Voting disks must be stored on shared accessible storage, because cluster during an operation, voting disk must be accessed by all member nodes in the clusterware.

  1. Prior to 11g R2 RAC, it could be placed ona raw device, a clustered filesystem supported by Oracle RAC such as OCFS, Sun Cluster, or Veritas Cluster filesystem.
  2. You should plan on allocating 280MB for each voting disk file.

Storage Mechanism of Voting Disk/Files in Oracle 11g R2 RAC:

  1. As of Oracle 11g R2 RAC, it can be placed on ASM disks.
  2. This simplifies management and improves performance.  But this brought up a puzzle too.
  3. For a node to join the cluster, it must be able to access voting disk, but voting disk is on ASM and ASM can’t be up until node is up.
  4. To resolve this issue, Oracle ASM reserves several blocks at a fixed location for every Oracle ASM disk used for storing the voting disk.
  5. As a result,Oracle Clusterware can access the voting disks present in ASM even, if the ASM instance is down and CSS can continue to maintain the Oracle cluster even if the ASM instance has failed.
  6. The physical location of the voting files in used ASM disks is fixed, i.e. the cluster stack does not rely on a running ASM instance to access the files. The location of the file is visible in the ASM disk header.
  7. The voting disk is not striped but put as a whole on ASM Disks.
  8.  In the event that the disk containing the voting disk fails, Oracle ASM will choose another disk on which to store this data.
  9. It eliminates the need for using a third-party cluster volume manager.
  10. You can reduce the complexity of managing disk partitions for voting disks during Oracle Clusterware installations.
  11. Voting disk needs to be mirrored, if it became unavailable, cluster will come down. Hence, you should maintain multiple copies of the voting disks on separate disk LUNs so that you eliminate a Single Point of Failure (SPOF) in your Oracle 11g RAC configuration.
  12. If voting disk is stored on ASM, multiplexing level of voting disk is decided by the redundancy of the ASM diskgroup.
Redundancy of the Diskgroup

 

No. of copies of voting disk

 

( Minimum # of disks in the Diskgroup)
External 1 1
Normal 3 3
High 5 5

i. If voting disk is on a diskgroup with external redundancy, one copy of voting file will be stored on one disk in the diskgroup.

ii. If we store voting disk on a diskgroup with normal redundancy, then one copy of voting file will be stored on 3 disk in the diskgroup. We should be able to tolerate the loss of one disk i.e. even if we lose one disk, we should have sufficient number of voting disks so that clusterware can continue.

iii. If the diskgroup with normal redundancy has 2 disks (minimum required for normal redundancy), we can store 2 copies of voting disk on it. If we lose one disk, only one copy of voting disk will be left and clusterware won’t be able to continue, Because to continue, clusterware should be able to access more than half the no. of voting disks i.e.> (2*1/2) , i.e. accessible voting disks must be greater than1 or equals to 2. Hence to be able to tolerate the loss of one disk, we should have 3 copies of the voting disk on a diskgroupwith normal redundancy. So, a normal redundancy diskgroup having voting disk should have minimum 3 disks in it.

iv. Similarly, if we store voting disk on diskgroup with high redundancy, 5 Voting Files are placed, each on one ASM Disk i.e a high redundancy diskgroup should have at least 5 disks so that even of we lose 2 disks, clusterware can continue.

13. Ensure that all the nodes participating in the cluster have read/write permissions on disks.

14. You can have up to a maximum of 15 voting disks. However, Oracle recommends minimum 3 voting disks and do not go beyond 5 voting disks.

Backing up voting disk:

  1. In previous versions of Oracle Clusterware you needed to backup the voting disks with the dd command.
  2. Starting with Oracle Clusterware 11g R2, Backup of Voting disk using “dd” command is not supported.
  3. Automatic backup of Voting disk and OCR happen after every four hours, end of the day, end of the week. That means there is no to take backup of voting disks manually.
  4. Voting disk and OCR automatic backup and kept together in a single file.
  5. In fact, Oracle explicitly indicates that you should not use a backup tool like dd to backup or restore voting disks. Doing so can lead to the loss of the voting disk.
  6. Although the Voting disk contents are not changed frequently, but you will need to back up the Voting disk file every time, when you perform following activities.
  7. You add or remove a node from the cluster or
  8. Immediately after you configure or upgrade a cluster.

    Thank you for reading… This is Airy…Enjoy Learning:)

#rac, #voting-disk

Oracle Cluster Registry (OCR) in Oracle 11gR2-RAC- Airy’s Notes:

Oracle Cluster Registry (OCR) in Oracle 11gR2-RAC- Airy’s Notes:

  1. Oracle cluster Registry (OCR) is the central repository for CRS, which maintains the metadata, configuration and state information of all cluster resources defined in clusterware and cluster database.
  2. OCR is the repository of configuration information for the cluster that manages information like, the cluster node list and cluster database instance-to-node mapping information and CRS application resource profile.
  3. It is a cluster registry used to maintain application resources and their availability within the RAC environment. It also stores configuration information for CRS daemons and clusterware managed applications.
  4. This configuration information is used by many of the processes that make up the CRS, as well as other cluster-aware applications which use this repository to share information among them.
  5. OCR also maintains dependency and status information for application resources defined within CRS, specifically databases, instances, services and node applications.
  6. The OCR uses a file-based repository to store configuration information in a series of key-value pairs, using a directory tree-like structure.
  7. The OCR must reside on a shared disk(s) that is accessible by all of the nodes in the cluster.
  8. Starting with Oracle Clusterware 10g R2, we are allowed to multiplex the OCR and Oracle recommends that you use this feature to ensure cluster high availability.
  9. Oracle Clusterware allows for a maximum of 5 OCR locations; one is the primary and the other will be OCR mirror.
  10. If you define a single OCR, then you should use external mirroring to provide redundancy.
  11. OCR can be replaced online .You can replace a failed OCR online, and you can update the OCR through supported APIs such as Enterprise Manager, the Server Control Utility (SRVCTL), or the Database Configuration Assistant (DBCA).
  12. It is highly recommended to take a backup of OCR file before making any changes.
  13. To view the contents of the OCR in a human-readable format, we have to run the ocrdump This will dump the contents of the OCR into an ASCII text file in the current directory named OCRDUMPFILE.
  14. The name of the configuration file is ocr.loc and the configuration file variable is ocrconfig.loc.

What Information Exist in OCR?

There are some of the main components, which are included in the OCR :

  1. Node membership information.
  2. The cluster node list and instance-to-node mapping information.
  3. Starting with Oracle 11g, OCR also contain the information about the location of voting disk.
  4. Server, Network, RAC Database, Instance, Node and Listener UP/Down and other mapping information
  5. ASM Instance and Disk groups Information.
  6. Cluster and Application resource profiles Information (such as RAC database, listener, Instance, VIP, Scan IP, Serverpool and Services etc ).
  7. Database Service characteristics like preferred and available nodes.
  8. TAF Policy, Load Balancing information.
  9. Details of the network interfaces held by the cluster network.
  10. Information about processes that Oracle Clusterware controls.
  11. Information about any third-party applications controlled by CRS.
  12. Information about OCR Backups.
  13. Software active version.
  14. OCR also maintains information regarding Dependencies, Management policy (automatic/manual), Callout Scripts and Retries.

Name of Process and Utilities, Who Updates OCR?

  1. CSSd at the time of cluster setup to update the status of the servers.
  2. CSS during node addition and Node Deletion.
  3. CRSd about status of nodes during failures and reconfiguration.
  4. Utilities OUI, SRVCTL, CRSCTL, OEM, NETCA, DBCA, DBUA, ASMCA.

How OCR Updated?

  1. Oracle uses a distributed shared cache architecture during cluster management to optimize queries against the cluster repository.
  2. For better performance each node in the cluster maintains an in-memory copy of OCR, along with an OCR process that accesses its OCR cache. Every time each node is required to update the OCR as required.
  3. Oracle Clusterware uses a background process to access the OCR cache.
  4. The CRSd process is responsible for reading and writing to the OCR files as well as refreshing the local OCR cache and the caches on the other nodes in the cluster.
  5. Only one CRSd process (designated as the master) in the cluster performs any disk read/write activity.
  6. Once any new information is read by the master CRSd process, it performs a refresh of the local OCR cache and the OCR cache on other nodes in the cluster.
  7. Since the OCR cache is distributed across all nodes in the cluster, OCR client application needs to update the OCR, they communicate through their local OCR process via the local CRSd process, to the OCR process that is performing input/output (I/O) for writing to the physical OCR binary file on disk.
  8. The OCR client applications are Oracle Universal Installer (OUI), SRVCTL, Enterprise Manger (EM), Database Configuration Assistant (DBCA), Database Upgrade Assistant(DBUA), NetCA and Virtual Internet Protocol Configuration assistant (VIPCA).

 Where OCR be stored?

  1. We can find the location of the OCR in a file on each individual node of the cluster. This location varies by platform but on Linux the location of the OCR is stored in the file /etc/oracle/ocr.loc
  2. The OCR must reside on a shared disk(s) that is accessible by all of the nodes in the cluster.
  3. Prior to oracle 11g R2, we had to create Oracle Cluster Repository (OCR) on raw devices. Since in Oracle 11g R2, the raw devices have been deprecated, so now we can choose in between a cluster file system or an ASM disk group.
  4. The OCR and voting disk must be on a shared device so putting it on local file system is not going to work.
  5. Now if we have a choice to choose between a cluster file system or an ASM disk group for keeping OCR: Clustered file systems may not be an option due to high cost. Other options may include network file systems but NFS are usually slow and unreliable. So, ASM remains the best choice.
  6. The OCR and voting disks could be on any available ASM disk group so there is no need to create exclusively disk groups for them.
  7. The OCR is striped and mirrored (if we have a redundancy other than external), similar to ordinary Database Files. So we can now have leverage the mirroring capabilities of ASM to mirror the OCR also, without having to use multiple RAW devices for that purpose only.
  8. The OCR is replicated across all the underlying disks of the disk group, so failure of a disk does not bring the failure of the disk group.
  9. Considering the criticality of the OCR contents to the cluster functionality, Oracle strongly recommends us to multiplex the OCR file. In Oracle 11g R2, we can have up to five OCR copies.
  10. Due to its shared location, from a single location, all the components running on all nodes and instances of Oracle can be administrated, irrespective of the node on which the registry was created.

What is the need of OCR?

  1. Oracle Clusterware reads the ocr.loc file for the location of the registry and to determine which applications resources need to be started and the nodes on which to start them.
  2. It is used to bootstrap the CSS for port info, nodes in the cluster and similar info.
  3. The CRSd, or Oracle Clusterware daemon’s function is to define and manage resources managed by Clusterware. Resources have profiles that define metadata about them. This metadata is stored in the OCR. The CRS reads the OCR and manages and Implement the following:
  •      Manages the application resources: starts, stops, monitors and manages their    failover
  •        Maintains and tracks information pertaining to the definition, availability, and current state of the services.
  •       Implements the workload balancing and continuous availability features of         services.
  •       Generates events during cluster state changes.
  •       Maintains configuration profiles of resources in the OCR.
  •      Records the currently known state of the cluster on a regular basis and provides  the same when queried (using srvctl, crsctl etc.)

How is the information stored in OCR?

  1. The OCR uses a file-based repository to store configuration information in a series of key-value pairs, using a directory tree-like structure.
  2. It contains information pertaining to all tiers of the clustered database.
  3. Various parameters are stored as name-value pairs used and maintained at different levels of the architecture.
  4. Each tier is managed and administrated by daemon processes with appropriate privileges to manage them. For example:
  5. All SYSTEM level resource or application definitions would require root or superuser privileges to start, stop, and execute resources defined at this level.
  6. Those defined at the DATABASE level will require dba privileges to execute.

Backup of OCR:

  1. Starting from Oracle Clusterware 11g Release 2, Oracle backs up the OCR automatically in every four hours on a schedule that is dependent on when the node started (not clock time).
  2. The default location where OCR backups are made is GRID_HOME/cdata/<cluster name> directory on the node performing the backups, where the <cluster_name> is the name of your cluster and GRID_HOME is the home directory of your Oracle GRID installation.
  3. One node known as the master node is dedicated to these backups, but in case master node is down, some other node may become the master. Hence, backups could be spread across nodes due to outages.
  4. These backups are named as follows:
  •    4-hour backups   (3 max) : backup00.ocr, backup01.ocr, and backup02.ocr.
  •    Daily backups     (2 max) : day.ocr and day_.ocr
  •    Weekly backups (2 max) : week.ocr and week_.ocr
  1. Oracle Clusterware maintains the last three backups, overwriting the older backups. Thus, you will have three 4-4hour backups, (i) the current one, (ii) one four hours old and (iii) one eight hours old. Therefore no additional clean-up tasks are required of the DBA.
  2. Oracle Clusterware will also take a backup at the end of the day. The last two of these backups are retained. Finally, at the end of each week Oracle will perform another backup, and again the last two of these backups are retained. You should make sure that your routine file system backups backup the OCR location.
  3. There is no way to customize the backup frequencies or the number of files that Oracle Grid Infrastructure retains while automatically backing OCR.
  4. Point to be noted RMAN does not backup the OCR.
  5. You can use the ocrconfig command to view the current OCR backups:
[root@paw-racnode1 bin]# ocrconfig -showbackup
racnode1  2016/07/21 17:16:03 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup00.ocr
racnode1  2016/07/21 17:16:03 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/day.ocr
racnode1  2016/07/21 17:16:03 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/week.ocr
racnode1  2016/07/21 16:14:00 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_161400.ocr
racnode1  2016/07/21 15:59:15 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155915.ocr
racnode1  2016/07/21 15:58:50 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155850.ocr
racnode1  2016/07/21 15:58:39 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155839.ocr

[root@paw-racnode1 app]# ocrconfig -showbackup auto
racnode1     2016/07/21 17:16:03     /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup00.ocr
racnode1     2016/07/21 17:16:03     /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/day.ocr
racnode1     2016/07/21 17:16:03     /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/week.ocr

[root@paw-racnode1 ~]# ocrconfig -showbackup manual
racnode1 2016/07/21 16:14:00  /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_161400.ocr
racnode1 2016/07/21 15:59:15  /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155915.ocr
racnode1 2016/07/21 15:58:50  /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155850.ocr
racnode1 2016/07/21 15:58:39  /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155839.ocr
  1. It is recommended that OCR backups may be placed on a shared location which can be configured using ocrconfig -backuploc <new location>
[root@paw-racnode1 named]# ocrconfig -backuploc /u01/app/ocr-backup
  1. If  your cluster is shutdown, then the automatic backups will not occur (nor will the purging). The timer restarts from the beginning when the cluster is restarted. When you start the cluster backup, a backup will not be taken immediately.  Hence, if you are stopping and starting your cluster that you could impact the OCR backups and the backup period could go long beyond 4 hours.
  2. If you feel that you need to backup the OCR immediately (for example, you have made a number of cluster related changes) then you can use the ocrconfig command to perform a manual backup:
[root@paw-racnode1 named]# ocrconfig -manualbackup
racnode1  2016/07/21 17:27:02 /u01/app/ocr-backup/backup_20160721_172702.ocr
racnode1  2016/07/21 16:14:00 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_161400.ocr
racnode1  2016/07/21 15:59:15 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155915.ocr
racnode1  2016/07/21 15:58:50 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155850.ocr
racnode1  2016/07/21 15:58:39 /u01/app/grid/product/11.2.0/grid/cdata/rac01-scan/backup_20160721_155839.ocr

 

Thank you for reading… This is Airy…Enjoy Learning:)

 

#ocr, #rac