Oracle DBA – A lifelong learning experience

Posts Tagged ‘crsctl’

Managing OCR and voting disks

Posted by John Hallas on November 28, 2012

This is basically a set of notes I wrote for myself about adding new voting disks and OCR disks to a sandpit RAC cluster as part of testing for migration between HP XP disk array and HP 3PAR disk array. The o/s was HPUX with 11.1.0.7 database.

 View status of OCR disks and Voting disks

sudo /app/oracle/product/crs/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     306972

         Used space (kbytes)      :       5880

         Available space (kbytes) :     301092

         ID                       :  746041401

         Device/File Name         : /dev/oracle/disk500

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/oracle/disk501

                                    Device/File integrity check succeeded

          Cluster registry integrity check succeeded

          Logical corruption check succeeded

crsctl query css votedisk

0.     0    /dev/oracle/disk502

1.     0    /dev/oracle/disk503

2.     0    /dev/oracle/disk504

Located 3 voting disk(s).

Add a new OCR disk

Backup first  (the 10GR1 command format still works)

sudo /app/oracle/product/crs/bin/ocrconfig -export /home/oracle/ocr_backup -s online

Owned by root

-rw——-   1 root       sys         136140 Nov 27 08:15 /home/oracle/ocr_backup

As this is an 11GR1 cluster we will use the 11GR1 format

sudo /app/oracle/product/crs/bin/ocrconfig -manualbackup

dhpor43     2012/11/27 08:23:00     /app/oracle/product/crs/cdata/SANDPITR1/backup_20121127_082300.ocr

Listing the backups shows the recent backups

sudo /app/oracle/product/crs/bin/ocrconfig -showbackup

dhpor43     2012/11/27 06:36:27     /app/oracle/product/crs/cdata/SANDPITR1/backup00.ocr

dhpor43     2012/11/27 02:36:27     /app/oracle/product/crs/cdata/SANDPITR1/backup01.ocr

dhpor43     2012/11/26 22:36:27     /app/oracle/product/crs/cdata/SANDPITR1/backup02.ocr

dhpor43     2012/11/25 02:36:27     /app/oracle/product/crs/cdata/SANDPITR1/day.ocr

dhpor43     2012/11/24 06:36:27     /app/oracle/product/crs/cdata/SANDPITR1/week.ocr

dhpor43     2012/11/27 08:23:00     /app/oracle/product/crs/cdata/SANDPITR1/backup_20121127_082300.ocr

I have 3 disks available (all at 1Gb,  which is easily enough for either a voting or OCR disk)

Free ASM disks and their paths

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

Header    Mode     Path                      Disk Size

——— ——– ————————- ———

CANDIDATE ONLINE   /dev/oracle/disk507             1Gb

CANDIDATE ONLINE   /dev/oracle/disk508             1Gb

CANDIDATE ONLINE   /dev/oracle/disk509             1Gb

sudo /app/oracle/product/crs/bin/ocrconfig -replace ocrmirror /dev/oracle/disk507

ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     306972

         Used space (kbytes)      :       5908

         Available space (kbytes) :     301064

         ID                       :  746041401

         Device/File Name         : /dev/oracle/disk500

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/oracle/disk507 disk replaced (was disk501)

                                    Device/File integrity check succeeded

         Cluster registry integrity check succeeded

However the replaced disk is not available although 507 has been removed from the list of candidate disks

Free ASM disks and their paths

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

Header    Mode     Path                      Disk Size

——— ——– ————————- ———

CANDIDATE ONLINE   /dev/oracle/disk508             1Gb

CANDIDATE ONLINE   /dev/oracle/disk509             1Gb

 

sudo /app/oracle/product/crs/bin/ocrconfig -replace ocr /dev/oracle/disk508

app/oracle/product/11.1.0/asm/bin $ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     306972

         Used space (kbytes)      :       5908

         Available space (kbytes) :     301064

         ID                       :  746041401

         Device/File Name         : /dev/oracle/disk508

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/oracle/disk507

                                    Device/File integrity check succeeded

Add a new voting disk

sudo /app/oracle/product/crs/bin/crsctl add css votedisk /dev/oracle/disk500 –force
/app/oracle/product/crs/bin/crsctl add css votedisk /dev/oracle/disk509 -force

 Now formatting voting disk: /dev/oracle/disk500.

Successful addition of voting disk /dev/oracle/disk500.

app/oracle/product/11.1.0/asm/bin $sudo /app/oracle/product/crs/bin/crsctl query css  votedisk

 0.     0    /dev/oracle/disk502

 1.     0    /dev/oracle/disk503

 2.     0    /dev/oracle/disk504

 3.     0    /dev/oracle/disk509

 4.     0    /dev/oracle/disk500

Located 5 voting disk(s).

crsctl delete css votedisk  /dev/oracle/disk509 

Successful deletion of voting disk /dev/oracle/disk509.

crsctl delete css votedisk  /dev/oracle/disk500 

Successful deletion of voting disk /dev/oracle/disk500.

sudo /app/oracle/product/crs/bin/crsctl query css  votedisk

 0.     0    /dev/oracle/disk502

 1.     0    /dev/oracle/disk503

 2.     0    /dev/oracle/disk504

Located 3 voting disk(s).

My follow up actions are to see if Linux performs in the same manner and what the difference is on a 11GR2 cluster. Finally I want to understand why the released disk retained their header and if there is any way of avoiding  having to dd the header. I expect that asmlib on Linux will prove different

 

Advertisements

Posted in ASM, Oracle | Tagged: , , , , | 2 Comments »