Friday, January 15, 2016

CRSCTL COMMANDS






ps -ef|grep d.bin
  • crsd.bin
  • evmd.bin
  • ocssd.bin
crsctl check crs
CSS,CRS,EVM appears healthy
crsctl stop crs
Stop crs and all other services
crsctl disable crs
Prevents CRS from starting on reboot
crsctl enable crs
Enables CRS start on reboot


1 [root@rac9 bin]# ./crstl stop cluster -all
-bash: ./crstl: No such file or directory [root@rac9 bin]# ./crsctl stop cluster -all CRS-2673: Attempting to stop 'ora.crsd' on 'rac8' CRS-2673: Attempting to stop 'ora.crsd' on 'rac9' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac8' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac9' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac9' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'rac9' CRS-2673: Attempting to stop 'ora.proddb.db' on 'rac9' CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac9' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac8' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'rac8' CRS-2673: Attempting to stop 'ora.proddb.db' on 'rac8' CRS-2673: Attempting to stop 'ora.registry.acfs' on 'rac8' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'rac8' CRS-2677: Stop of 'ora.registry.acfs' on 'rac8' succeeded CRS-2677: Stop of 'ora.registry.acfs' on 'rac9' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.rac8.vip' on 'rac8' CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'rac8' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'rac8' CRS-2677: Stop of 'ora.scan2.vip' on 'rac8' succeeded CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'rac9' succeeded CRS-2677: Stop of 'ora.rac8.vip' on 'rac8' succeeded CRS-2677: Stop of 'ora.scan3.vip' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on 'rac9' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.rac9.vip' on 'rac9' CRS-2677: Stop of 'ora.rac9.vip' on 'rac9' succeeded CRS-2677: Stop of 'ora.scan1.vip' on 'rac9' succeeded CRS-2677: Stop of 'ora.proddb.db' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.CRS.dg' on 'rac8' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac8' CRS-2677: Stop of 'ora.proddb.db' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.CRS.dg' on 'rac9' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac9' CRS-2677: Stop of 'ora.CRS.dg' on 'rac8' succeeded CRS-2677: Stop of 'ora.DATA.dg' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'rac8' CRS-2677: Stop of 'ora.asm' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'rac8' CRS-2673: Attempting to stop 'ora.eons' on 'rac8' CRS-2677: Stop of 'ora.ons' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'rac8' CRS-2677: Stop of 'ora.net1.network' on 'rac8' succeeded CRS-2677: Stop of 'ora.eons' on 'rac8' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac8' has completed CRS-2677: Stop of 'ora.CRS.dg' on 'rac9' succeeded CRS-2677: Stop of 'ora.DATA.dg' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'rac9' CRS-2677: Stop of 'ora.asm' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.eons' on 'rac9' CRS-2673: Attempting to stop 'ora.ons' on 'rac9' CRS-2677: Stop of 'ora.ons' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'rac9' CRS-2677: Stop of 'ora.net1.network' on 'rac9' succeeded CRS-2677: Stop of 'ora.crsd' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac8' CRS-2673: Attempting to stop 'ora.ctssd' on 'rac8' CRS-2673: Attempting to stop 'ora.evmd' on 'rac8' CRS-2673: Attempting to stop 'ora.asm' on 'rac8' CRS-2677: Stop of 'ora.cssdmonitor' on 'rac8' succeeded CRS-2677: Stop of 'ora.evmd' on 'rac8' succeeded CRS-2677: Stop of 'ora.ctssd' on 'rac8' succeeded CRS-2677: Stop of 'ora.eons' on 'rac9' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac9' has completed CRS-2677: Stop of 'ora.crsd' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac9' CRS-2673: Attempting to stop 'ora.ctssd' on 'rac9' CRS-2673: Attempting to stop 'ora.evmd' on 'rac9' CRS-2673: Attempting to stop 'ora.asm' on 'rac9' CRS-2677: Stop of 'ora.cssdmonitor' on 'rac9' succeeded CRS-2677: Stop of 'ora.evmd' on 'rac9' succeeded CRS-2677: Stop of 'ora.ctssd' on 'rac9' succeeded CRS-2677: Stop of 'ora.asm' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'rac8' CRS-2677: Stop of 'ora.cssd' on 'rac8' succeeded CRS-2673: Attempting to stop 'ora.diskmon' on 'rac8' CRS-2677: Stop of 'ora.diskmon' on 'rac8' succeeded CRS-2677: Stop of 'ora.asm' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'rac9' CRS-2677: Stop of 'ora.cssd' on 'rac9' succeeded CRS-2673: Attempting to stop 'ora.diskmon' on 'rac9' CRS-2677: Stop of 'ora.diskmon' on 'rac9' succeeded [root@rac9 bin]#



2 [root@rac9 bin]# ./crsctl start cluster -all
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac8' CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac9' CRS-2676: Start of 'ora.cssdmonitor' on 'rac9' succeeded CRS-2676: Start of 'ora.cssdmonitor' on 'rac8' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'rac9' CRS-2672: Attempting to start 'ora.diskmon' on 'rac9' CRS-2672: Attempting to start 'ora.cssd' on 'rac8' CRS-2672: Attempting to start 'ora.diskmon' on 'rac8' CRS-2676: Start of 'ora.diskmon' on 'rac8' succeeded CRS-2676: Start of 'ora.diskmon' on 'rac9' succeeded CRS-2676: Start of 'ora.cssd' on 'rac9' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'rac9' CRS-2676: Start of 'ora.cssd' on 'rac8' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'rac8' CRS-2676: Start of 'ora.ctssd' on 'rac9' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'rac9' CRS-2672: Attempting to start 'ora.asm' on 'rac9' CRS-2676: Start of 'ora.ctssd' on 'rac8' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'rac8' CRS-2672: Attempting to start 'ora.asm' on 'rac8' CRS-2676: Start of 'ora.evmd' on 'rac9' succeeded CRS-2676: Start of 'ora.evmd' on 'rac8' succeeded CRS-2676: Start of 'ora.asm' on 'rac8' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'rac8' CRS-2676: Start of 'ora.asm' on 'rac9' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'rac9' CRS-2676: Start of 'ora.crsd' on 'rac8' succeeded CRS-2676: Start of 'ora.crsd' on 'rac9' succeeded [root@rac9 bin]#

3 [root@rac9 bin]# ./crsctl check cluster -all ************************************************************** rac8: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** rac9: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online **************************************************************


4 [root@rac9 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   289b034110054f52bfdc926bd5b509fd (/dev/oracleasm/disks/VOTE1) [CRS]
Located 1 voting disk(s).


5 ./crsctl delete css votedisk <path>


login as: root
root@192.168.1.203's password:
Last login: Thu Jan 14 15:10:39 2016 from 192.168.1.162
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ . oraev
-bash: oraev: No such file or directory
[grid@rac1 ~]$ +ASM1
-bash: +ASM1: command not found
[grid@rac1 ~]$ . oraenv
ORACLE_SID = [grid] ? +ASM1
The Oracle base for ORACLE_HOME=/syed/grid_home is /syed/11.2.0
[grid@rac1 ~]$ cd /syed/grid_home
[grid@rac1 grid_home]$ cd bin
[grid@rac1 bin]$ ./crsctl check cluster -all
**************************************************************
rac1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
rac2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************



[grid@rac1 bin]$ ./crs_stat-t
-bash: ./crs_stat-t: No such file or directory
[grid@rac1 bin]$ ./crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.CRS.dg     ora....up.type ONLINE    ONLINE    rac1
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac2
ora....N2.lsnr ora....er.type ONLINE    ONLINE    rac1
ora....N3.lsnr ora....er.type ONLINE    ONLINE    rac1
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    rac1
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1
ora....SM1.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    OFFLINE   OFFLINE
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1
ora....SM2.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    OFFLINE   OFFLINE
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2
ora.racdb.db   ora....se.type ONLINE    ONLINE    rac1
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac2
ora.scan2.vip  ora....ip.type ONLINE    ONLINE    rac1
ora.scan3.vip  ora....ip.type ONLINE    ONLINE    rac1


[grid@rac1 bin]$ ./crsctl status resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.DATA.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.asm
               ONLINE  ONLINE       rac1                     Started
               ONLINE  ONLINE       rac2                     Started
ora.eons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.gsd
               OFFLINE OFFLINE      rac1
               OFFLINE OFFLINE      rac2
ora.net1.network
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.ons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.registry.acfs
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac2
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1
ora.oc4j
      1        OFFLINE OFFLINE
ora.rac1.vip
      1        ONLINE  ONLINE       rac1
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open
      2        ONLINE  ONLINE       rac2                     Open
ora.scan1.vip
      1        ONLINE  ONLINE       rac2
ora.scan2.vip
      1        ONLINE  ONLINE       rac1
ora.scan3.vip
      1        ONLINE  ONLINE       rac1
[grid@rac1 bin]$ ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2780
         Available space (kbytes) :     259340
         ID                       : 1747467383
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check bypassed due to non-privileged user

[grid@rac1 bin]$ ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   7e4815f29d7b4f72bf7b7aff245894c9 (/dev/oracleasm/disks/VOTE1) [CRS]
Located 1 voting disk(s).





[grid@rac1 bin]$ ./crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.1.0]
[grid@rac1 bin]$




[grid@rac1 bin]$ ./crsctl -h
Usage: crsctl add       - add a resource, type or other entity
       crsctl check     - check a service, resource or other entity
       crsctl config    - output autostart configuration
       crsctl debug     - obtain or modify debug state
       crsctl delete    - delete a resource, type or other entity
       crsctl disable   - disable autostart
       crsctl enable    - enable autostart
       crsctl get       - get an entity value
       crsctl getperm   - get entity permissions
       crsctl lsmodules - list debug modules
       crsctl modify    - modify a resource, type or other entity
       crsctl query     - query service state
       crsctl pin       - Pin the nodes in the nodelist
       crsctl relocate  - relocate a resource, server or other entity
       crsctl replace   - replaces the location of voting files
       crsctl setperm   - set entity permissions
       crsctl set       - set an entity value
       crsctl start     - start a resource, server or other entity
       crsctl status    - get status of a resource or other entity
       crsctl stop      - stop a resource, server or other entity
       crsctl unpin     - unpin the nodes in the nodelist
       crsctl unset     - unset a entity value, restoring its default
[grid@rac1 bin]$



Starting and Stopping the Cluster
Use the crsctl command to start and stop the cluster on a specific node. This example starts the cluster and the following example stops the cluster.
$GRID_HOME/bin/crsctl start crs
$GRID_HOME/bin/crsctl stop crs


[grid@rac1 bin]$ ./ocrdump -h
Name:
        ocrdump - Dump contents of Oracle Cluster/Local Registry to a file.

Synopsis:
        ocrdump [-local] [<filename>|-stdout] [-backupfile <backupfilename>] [-keyname <keyname>] [-xml] [-noheader]

Description:
        Default filename is OCRDUMPFILE. Examples are:

        prompt> ocrdump
        writes cluster registry contents to OCRDUMPFILE in the current directory

        prompt> ocrdump MYFILE
        writes cluster registry contents to MYFILE in the current directory

        prompt> ocrdump -stdout -keyname SYSTEM
        writes the subtree of SYSTEM in the cluster registry to stdout

        prompt> ocrdump -local -stdout -xml
        writes local registry contents to stdout in xml format

        prompt> ocrdump -backupfile /oracle/CRSHOME/backup.ocr -stdout -xml
        writes registry contents in the backup file to stdout in xml format

Notes:
        The header information will be retrieved based on best effort basis.
        A log file will be created in
        $ORACLE_HOME/log/<hostname>/client/ocrdump_<pid>.log. Make sure
        you have file creation privileges in the above directory before
        running this tool.
        Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.

[grid@rac1 b


[grid@rac1 bin]$ ./ocrdump /tmp/ocr.dmp
[grid@rac1 bin]$ vi  /tmp/ocr.dmp
01/15/2016 11:17:15
./ocrdump.bin /tmp/ocr.dmp

[SYSTEM]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.version]
UB4 (10) : 5
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.version.activeversion]
ORATEXT : 11.2.0.1.0
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.version.hostnames]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.version.hostnames.rac1]
ORATEXT : 11.2.0.1.0
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.version.hostnames.rac2]
ORATEXT : 11.2.0.1.0
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.versionstring]
ORATEXT : 11g Release 2
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.WALLET]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_CREATE_SUB_KEY, OTHER_PERMISSION : PROCR_CREATE_SUB_KEY, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.GNS]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}

[SYSTEM.css]
UNDEF :
@





Enable or Disable Oracle Clusterware Daemons
Oracle Clusterware will automatically restart when a node is rebooted. There may be cases (like performing system maintenance) where you do not want clusterware to restart on a given node. The first command in the following example will keep Clusterware from stopping on the node that the command is executed on:. The second command in the following example will re-enable Clusterware on that node.
$GRID_HOME/bin/crsctl disable crs
$GRID_HOME/bin/crsctl enable crs




Starting and Stopping the Cluster
Use the crsctl command to start and stop the cluster on a specific node. This example starts the cluster and the following example stops the cluster.
$GRID_HOME/bin/crsctl start crs
$GRID_HOME/bin/crsctl stop crs



[grid@rac1 bin]$ ./olsnodes -n -s
rac1    1       Active
rac2    2       Active
[grid@rac1 bin]$



Start Cluster services on bi1crsctl start cluster -n oraclebi1
Stop resourcecrsctl stop resource ora.crsd
start resourcecrsctl start resource ora.crsd
crsctl start res ora.registry.acfs -n oracletest1
OCR BACKUP 
==============
physical backup====Automatic backup taken every 4 hours
logical backup

[grid@rac1 bin]$ ./ocrconfig -showbackup

rac1     2016/01/15 11:28:53     /syed/grid_home/cdata/rac-cluster/backup00.ocr

rac1     2016/01/15 07:28:50     /syed/grid_home/cdata/rac-cluster/backup01.ocr

rac1     2016/01/15 03:28:45     /syed/grid_home/cdata/rac-cluster/backup02.ocr

rac1     2016/01/14 23:28:18     /syed/grid_home/cdata/rac-cluster/day.ocr

rac1     2016/01/14 23:28:18     /syed/grid_home/cdata/rac-cluster/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
[grid@rac1 bin]


Manual physical backup
=======================
[root@rac1 ~]# cd /syed/grid_home
[root@rac1 grid_home]# cd bin
[root@rac1 bin]# ./ocrconfig -manualbackup

rac1     2016/01/15 11:39:25     /syed/grid_home/cdata/rac-cluster/backup_20160115_113925.           ocr


[root@rac1 bin]#



[root@rac1 bin]# ./ocrconfig -showbackup

rac1     2016/01/15 11:28:53     /syed/grid_home/cdata/rac-cluster/backup00.ocr

rac1     2016/01/15 07:28:50     /syed/grid_home/cdata/rac-cluster/backup01.ocr

rac1     2016/01/15 03:28:45     /syed/grid_home/cdata/rac-cluster/backup02.ocr

rac1     2016/01/14 23:28:18     /syed/grid_home/cdata/rac-cluster/day.ocr

rac1     2016/01/14 23:28:18     /syed/grid_home/cdata/rac-cluster/week.ocr

rac1     2016/01/15 11:39:25     /syed/grid_home/cdata/rac-cluster/backup_20160115_113925.ocr


[root@rac1 bin]# ./ocrconfig -local -export /tmp/olr.bak


To Get Active Cluster Version
$crsctl query crs activeversion

To Get cluster version of given node
$crsctl query crs softwareversion [node_name]

Ex:$crsctl query crs softwareversion rac1

#crsctl start crs
#crsctl stop crs

(or)

#/etc/init.d/init.crs start
#/etc/init.d/init.crs stop

#crsctl enable crs
#crsctl disable crs

(or)

#/etc/init.d/init.crs enable
#/etc/init.d/init.crs disable

To get cluster stack health status
$crsctl check crs

To get the viability of CSS across nodes
$crsctl check cluster [-node node_name]   -- 11gR2 RACcommand

#crsctl start cluster -n HostName -- 11g R2
#crsctl stop cluster -n HostName -- 11g R2
#crsctl stop cluster -all  -- 11g R2

$ps -ef | grep d.bin
$crsctl check cssd
$crsctl check crsd
$crsctl check evmd
$crsctl check oprocd
$crsctl check ctss

#/etc/init.d/init.cssd stop
#/etc/init.d/init.cssd start

#/etc/rc.d/init.d/init.evmd
#/etc/rc.d/init.d/init.cssd
#/etc/rc.d/init.d/init.crsd

#mv /etc/rc3.d/S96init.cssd /etc/rc3.d/_S96init.cssd -- to stop cssd from autostarting after reboot

#crsctl check css votedisk
#crsctl query css votedisk -- lists the voting disks used by CSS command in 11gR2

#crsctl add css votedisk PATH
#crsctl add css votedisk PATH -force -- if Clusterware is not running
#crsctl delete css votedisk PATH
#crsctl delete css votedisk PATH -force -- if Clusterware is not running

#crsctl set css parameter_name value -- set parameters on OCR
#crsctl set css misscount 100
#crsctl unset css parameter_name -- sets CSS parameter to its default
#crsctl unset css misscount
#crsctl get css parameter_name -- gets the value of a CSS parameter
#crsctl get css disktimeout
#crsctl get css misscount
#crsctl get css reboottime

#crsctl start resources -- starts Clusterware resources
#crsctl start resource ora.DATA.dg
#crsctl stop resources -- stops Clusterware resources

$crsctl status resource
$crsctl status resource -t
$crsctl stat resource -t
#crsctl lsmodules crs -- lists CRS modules that can be used for debugging( need root privilage)
List CRSD Debug Module: AGENT
List CRSD Debug Module: AGFW
List CRSD Debug Module: CLSFRAME
List CRSD Debug Module: CLSVER
List CRSD Debug Module: CLUCLS
List CRSD Debug Module: COMMCRS
List CRSD Debug Module: COMMNS
List CRSD Debug Module: CRSAPP
List CRSD Debug Module: CRSCCL
List CRSD Debug Module: CRSCEVT
List CRSD Debug Module: CRSCOMM
List CRSD Debug Module: CRSD
List CRSD Debug Module: CRSEVT
List CRSD Debug Module: CRSMAIN
List CRSD Debug Module: CRSOCR
List CRSD Debug Module: CRSPE
List CRSD Debug Module: CRSPLACE
List CRSD Debug Module: CRSRES
List CRSD Debug Module: CRSRPT
List CRSD Debug Module: CRSRTI
List CRSD Debug Module: CRSSE
List CRSD Debug Module: CRSSEC
List CRSD Debug Module: CRSTIMER
List CRSD Debug Module: CRSUI
List CRSD Debug Module: CSSCLNT
List CRSD Debug Module: OCRAPI
List CRSD Debug Module: OCRASM
List CRSD Debug Module: OCRCAC
List CRSD Debug Module: OCRCLI
List CRSD Debug Module: OCRMAS
List CRSD Debug Module: OCRMSG
List CRSD Debug Module: OCROSD
List CRSD Debug Module: OCRRAW
List CRSD Debug Module: OCRSRV
List CRSD Debug Module: OCRUTL
List CRSD Debug Module: SuiteTes
List CRSD Debug Module: UiServer

$crsctl lsmodules css -- lists CSS modules that can be used for debugging
The following are the Cluster Synchronization Services modules::
    CSSD
    COMMCRS
    COMMNS
    CLSF
    SKGFD

$crsctl lsmodules evm -- lists EVM modules that can be used for debugging
The following are the Cluster Synchronization Services modules::
    CSSD
    COMMCRS
    COMMNS
    CLSF
    SKGFD

$crsctl start has   (HAS - High Availability Services)
$crsctl stop has
$crsctl check has
CRS-4638 Oracle High Availability Service is online

OCR Modules -- cannot be listed with crsctl lsmodules command
OCRAPI
OCRCLI
OCRSRV
OCRMAS
OCRMSG
OCRCAC
OCRRAW
OCRUTL
OCROSD

#crsctl debug statedump crs -- dumps state info for crs objects
#crsctl debug statedump css -- dumps state info for css objects
#crsctl debug statedump evm -- dumps state info for evm objects

#crsctl debug log crs [module:level]{,module:level} ...

-- Turns on debugging for CRS
#crsctl debug log crs CRSEVT:5,CRSAPP:5,CRSTIMER:5,CRSRES:5,CRSRTI:1,CRSCOMM:2
#crsctl debug log css [module:level]{,module:level} ...

-- Turns on debugging for CSS
#crsctl debug log css CSSD:1
#crsctl debug log evm [module:level]{,module:level} ...
-- Turns on debugging for EVM
#crsctl debug log evm EVMCOMM:1

#crsctl debug trace crs -- dumps CRS in-memory tracing cache
#crsctl debug trace css -- dumps CSS in-memory tracing cache
#crsctl debug trace evm -- dumps EVM in-memory tracing cache

#crsctl debug log res resource_name:level -- turns on debugging for resources
#crsctl debug log res "ora.lnx04.vip:1"

#crsctl trace all_the_above_commands -- tracing by adding a "trace" argument.
#crsctl trace check css
#crsctl backup -h
#crsctl backup css votedisk

Here is the list of the options for CRSCTL in 11gR2:
       crsctl add       - add a resource, type or other entity
       crsctl backup    - back up voting disk for CSS
       crsctl check     - check a service, resource or other entity
       crsctl config    - output autostart configuration
       crsctl debug     - obtain or modify debug state
       crsctl delete    - delete a resource, type or other entity
       crsctl disable   - disable autostart
       crsctl discover  - discover DHCP server
       crsctl enable    - enable autostart
       crsctl get       - get an entity value
       crsctl getperm   - get entity permissions
       crsctl lsmodules - list debug modules
       crsctl modify    - modify a resource, type or other entity
       crsctl query     - query service state
       crsctl pin       - Pin the nodes in the nodelist
       crsctl relocate  - relocate a resource, server or other entity
       crsctl replace   - replaces the location of voting files
       crsctl release   - release a DHCP lease
       crsctl request   - request a DHCP lease
       crsctl setperm   - set entity permissions
       crsctl set       - set an entity value
       crsctl start     - start a resource, server or other entity
       crsctl status    - get status of a resource or other entity
       crsctl stop      - stop a resource, server or other entity
       crsctl unpin     - unpin the nodes in the nodelist
       crsctl unset     - unset a entity value, restoring its default

How do I identify the voting disk/file location?
#crsctl query css votedisk


























No comments:

Post a Comment