Saturday, January 28, 2017

Relocate OCR from +DATA1 to different disks


Task:-
 Relocate OCR from +DATA1 to +DATA2

Requirement:-

Need +DATA2 disk group 


Step 1: Check current OCR location 


[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3064
         Available space (kbytes) :     259056
         ID                       :  918475055
         Device/File Name         :     +DATA1
                                    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 succeeded

[root@rac1 bin]#
[root@rac1 bin]# pwd
/u01/app/11.2.0/grid_1/bin
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3064
         Available space (kbytes) :     259056
         ID                       :  918475055
         Device/File Name         :     +DATA1
                                    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 succeeded

Step 2: Verify asm diskgroup for relocate 

[root@rac1 bin]# oracleasm listdisks
DISK1
DISK2
DISK3

Step 3:-  Now add +DATA2 as new OCR location and verify using below command  
[root@rac1 bin]#
[root@rac1 bin]# ./ocrconfig -add +DATA2
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3064
         Available space (kbytes) :     259056
         ID                       :  918475055
         Device/File Name         :     +DATA1
                                    Device/File integrity check succeeded
         Device/File Name         :     +DATA2
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

Step4:- Now delete old location +DATA1 using below command  and verify

[root@rac1 bin]# ./ocrconfig -delete +DATA1
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3064
         Available space (kbytes) :     259056
         ID                       :  918475055
         Device/File Name         :     +DATA2
                                    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 succeeded

[root@rac1 bin]#



Thursday, January 26, 2017

ORA-00845: MEMORY_TARGET not supported on this system

Cause:

Memory Target  error come due to lack of tmp space on server .



[oracle@rac1 ~]$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root   26G   20G  5.0G  80% /
tmpfs                        1.5G  442M  1.1G  31% /dev/shm
/dev/sda1                    477M   55M  397M  13% /boot
[oracle@rac1 ~]$
[oracle@rac1 ~]$


Solution :

Need to increase temp space on server

# umount tmpfs
# mount -t tmpfs shmfs -o size=4048m /dev/shm

Make entry in fstab file on /etc/fstab 


[root@rac1]$ cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sun Sep 18 01:17:50 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_rac1-lv_root /                       ext4    defaults        1 1
UUID=b6ddbb52-c2ca-43c3-b9ac-10bb01e90d27 /boot                   ext4    defaults        1 2
/dev/mapper/vg_rac1-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
shmfs                   /dev/shm                tmpfs   size=4048m      0 0
[oracle@rac1 trace]$

reboot server
init 6

start database .


Tuesday, September 20, 2016

PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system





[root@rac1 bin]# ./oifcfg getif
*  192.168.1.0  global  public
*  192.168.0.0  global  cluster_interconnect
eth0  192.168.1.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
Only in OCR: eth0  192.168.1.0  global  cluster_interconnect,public
PRIF-51: interface [eth0] is set to both public and cluster_interconnect
PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg setif -global eth0/192.168.1.0:public
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg setif -global eth1/192.168.0.0:cluster_interconnect
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg getif
*  192.168.1.0  global  public
*  192.168.0.0  global  cluster_interconnect
eth0  192.168.1.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg delif -global */192.168.1.0
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg delif -global */192.168.0.0
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./oifcfg getif
eth0  192.168.1.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
[root@rac1 bin]#
[root@rac1 bin]#


after restart cluster

CHANGE VIP STATUS FROM INTERMEDIATE STATE TO BACK ONLINE IN RAC

CHANGE VIP STATUS FROM INTERMEDIATE STATE TO BACK ONLINE
==================================================================


[root@rac1 bin]# ./crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.DATA2.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.LISTENER.lsnr
               ONLINE  OFFLINE      rac1
               ONLINE  ONLINE       rac2
ora.asm
               ONLINE  ONLINE       rac1                     Started
               ONLINE  ONLINE       rac2                     Started
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
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1
ora.cvu
      1        ONLINE  ONLINE       rac1
ora.oc4j
      1        ONLINE  ONLINE       rac2
ora.rac1.vip
      1        ONLINE  INTERMEDIATE rac2
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.scan1.vip
      1        ONLINE  ONLINE       rac1
ora.scan2.vip
      1        ONLINE  ONLINE       rac1
ora.scan3.vip
      1        ONLINE  ONLINE       rac1
[root@rac1 bin]# crsctl status resource ora.rac1.vip
-bash: crsctl: command not found
[root@rac1 bin]#
[root@rac1 bin]# ./crsctl status resource ora.rac1.vip
NAME=ora.rac1.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=INTERMEDIATE on rac2

[root@rac1 bin]# ./crsctl stop resource ora.rac1.vip
CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac2'
CRS-2677: Stop of 'ora.rac1.vip' on 'rac2' succeeded
[root@rac1 bin]#
[root@rac1 bin]# ./crsctl start resource ora.rac1.vip
CRS-2672: Attempting to start 'ora.rac1.vip' on 'rac1'
CRS-2676: Start of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'rac1'
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'rac1' succeeded
[root@rac1 bin]#
[root@rac1 bin]#
[root@rac1 bin]# ./crsctl status resource ora.rac1.vip
NAME=ora.rac1.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on rac1

[root@rac1 bin]#
[root@rac1 bin]# ./crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.DATA2.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.gsd
               OFFLINE OFFLINE      rac1
               OFFLINE OFFLINE      rac2
ora.net1.network
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
ora.ons
               ONLINE  ONLINE       rac1
               ONLINE  ONLINE       rac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1
ora.cvu
      1        ONLINE  ONLINE       rac1
ora.oc4j
      1        ONLINE  ONLINE       rac2
ora.rac1.vip
      1        ONLINE  ONLINE       rac1
ora.rac2.vip
      1        ONLINE  ONLINE       rac2
ora.scan1.vip
      1        ONLINE  ONLINE       rac1
ora.scan2.vip
      1        ONLINE  ONLINE       rac1
ora.scan3.vip
      1        ONLINE  ONLINE       rac1
[root@rac1 bin]#
[root@rac1 bin]#


Possible resource state :-
==============================