Tuesday, 7 August 2012

Moving OCR and Voting Disk from Raw Devices to ASM Disk

After upgrade from 10.2 to 11.3, you can use the following steps to move the ocr and Voting disk from Raw devices to ASM Disk.

1) Check the current OCR and Voting disk file

     OCR file status


     [oracle@coltdb01 ~]$ ocrcheck
     Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     240480
         Used space (kbytes)      :       6520
         Available space (kbytes) :     233960
         ID                       : 1362593683
         Device/File Name         : /dev/raw/raw1
                                    Device/File integrity check succeeded
         Device/File Name         : /dev/raw/raw2
                                    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 bypassed due to non-privileged user

      Voting Disk status


       [oracle@coltdb01 ~]$ crsctl query css votedisk
       ##  STATE    File Universal Id                File Name Disk group
        --  -----    -----------------                --------- ---------
        1. ONLINE   2a87ecd7fedadfe9ff06de264773036e (/dev/raw/raw3) []
        2. ONLINE   2ca3947acf51ffa2bf271bf037bc8779 (/dev/raw/raw4) []
        3. ONLINE   1a72a3dca25eefabff869f8f5a661af3 (/dev/raw/raw5) []

2) Create a new ASM diskgroup for OCR and Voting disk.(you can use the existing disk also)

    SQL> create diskgroup CRS external redundancy DISK 'ORCL:VOL5';

    * Once you have created the Partition on node 1, execute the "partprobe" command on both the nodes
          
   * Execute "Oracleasm scandisks"  to check for the new ASM disk created. Verify using  "oracleasm listdisks" on node 2
   
   * Check on the node 2 whether the diskgroup created is mounted, otherwise mount it using
        SQL> alter diskgroup CRS MOUNT;

3) Change the compatible version of the asm diskgroup to 11.2

   SQL> select name,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

          NAME       COMPATIBILITY        DATABASE_COMPATIBILI
          ---------- -------------------- --------------------
          DATA         10.1.0.0.0           10.1.0.0.0
          FRA          10.1.0.0.0           10.1.0.0.0
          CRS          10.1.0.0.0           10.1.0.0.0

     SQL> alter diskgroup DATA set attribute 'compatible.asm'='11.2';

           Diskgroup altered.

     SQL> alter diskgroup FRA set attribute 'compatible.asm'='11.2';

          Diskgroup altered.

      SQL> alter diskgroup CRS set attribute 'compatible.asm'='11.2';

          Diskgroup altered.

       SQL> alter diskgroup DATA set attribute 'compatible.rdbms'='11.2';

          Diskgroup altered.

        SQL> alter diskgroup FRA set attribute 'compatible.rdbms'='11.2';

        Diskgroup altered.

        SQL> alter diskgroup CRS set attribute 'compatible.rdbms'='11.2';

        Diskgroup altered.

       SQL> select name,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;

           NAME       COMPATIBILITY        DATABASE_COMPATIBILI
            ---------- -------------------- --------------------
           DATA         11.2.0.0.0           11.2.0.0.0
           FRA          11.2.0.0.0           11.2.0.0.0
           CRS          11.2.0.0.0           11.2.0.0.0

4) Replace the existing ocr file with the ASM disk
   
       [root@coltdb01 bin]# ./ocrconfig -replace /dev/raw/raw1 -replacement +CRS
   [root@coltdb01 bin]# ./ocrconfig -replace /dev/raw/raw2 -replacement +DATA

       Check the ocr status using ocrcheck
 
        [oracle@coltdb01 grid]$ ocrcheck
        Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     240480
         Used space (kbytes)      :       6516
         Available space (kbytes) :     233964
         ID                       : 1362593683
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded
         Device/File Name         :      +DATA
                                    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 bypassed due to non-privileged user

5) Replace the voting disk as below
 
    [oracle@coltdb01 grid]$ crsctl replace votedisk +CRS
     CRS-4256: Updating the profile
     Successful addition of voting disk 8a10ad3375914f43bfc301334a9f6c2c.
     Successful deletion of voting disk 2a87ecd7fedadfe9ff06de264773036e.
     Successful deletion of voting disk 2ca3947acf51ffa2bf271bf037bc8779.
     Successful deletion of voting disk 1a72a3dca25eefabff869f8f5a661af3.
     Successfully replaced voting disk group with +CRS.
    CRS-4256: Updating the profile
    CRS-4266: Voting file(s) successfully replaced

     Check the Voting disk file
     [oracle@coltdb01 grid]$ crsctl query css votedisk
     ##  STATE    File Universal Id                File Name Disk group
     --  -----    -----------------                --------- ---------
      1. ONLINE   8a10ad3375914f43bfc301334a9f6c2c (ORCL:VOL5) [CRS]

6)  You can also use the following command to check ocr status
   
      cluvfy comp ocr -n all -verbose












No comments:

Post a Comment