Moving Oracle Cluster Registry and/or Voting Disks to different location

Important note: This post is applicable only for Oracle Databases 11gR2 onwards. The steps for 11gR1 and earlier versions are different. Also these steps are for OCR and Voting disks hosted on a certified cluster file system. If you are using ASM or Raw devices to store these files then the initial preparation tasks might differ

Please note that Oracle Cluster requires to remain up during this operation. For safer side we had shut down the databases during this but this is not required. The cluster was up and running during this operation.

 

Move OCR (Oracle Cluster Registry) Disks

1) Check existing OCR disks

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck -config

Oracle Cluster Registry configuration is :

Device/File Name : /u01/racfiles/ocr

Device/File Name : /u02/racfiles/ocr

Device/File Name : /u03/racfiles/ocr

 

2) Prepare new disks

root@rachost1 # mkdir /u04/racfiles

root@rachost1 # chown root:dba /u04/racfiles/

root@rachost1 # touch /u04/racfiles/ocr

root@rachost1 # chown root:dba /u04/racfiles/ocr

root@rachost1 # chmod 640 /u04/racfiles/ocr

 

3) Check current backups for OCR

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -showbackup

rachost1 2014/04/16 11:26:48 /app/oracle/11.2.0/grid/cdata/cluster/backup00.ocr

rachost1 2014/04/16 07:26:47 /app/oracle/11.2.0/grid/cdata/cluster/backup01.ocr

rachost1 2014/04/16 03:26:46 /app/oracle/11.2.0/grid/cdata/cluster/backup02.ocr

rachost1 2014/04/15 03:26:41 /app/oracle/11.2.0/grid/cdata/cluster/day.ocr

rachost1 2014/04/03 03:25:47 /app/oracle/11.2.0/grid/cdata/cluster/week.ocr

PROT-25: Manual backups for the Oracle Cluster Registry are not available

 

4) Take one manual backup if required

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -manualbackup

rachost1 2014/04/16 11:40:47 /app/oracle/11.2.0/grid/cdata/cluster/backup_20140416_114047.ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -showbackup

rachost1 2014/04/16 11:26:48 /app/oracle/11.2.0/grid/cdata/cluster/backup00.ocr

rachost1 2014/04/16 07:26:47 /app/oracle/11.2.0/grid/cdata/cluster/backup01.ocr

rachost1 2014/04/16 03:26:46 /app/oracle/11.2.0/grid/cdata/cluster/backup02.ocr

rachost1 2014/04/15 03:26:41 /app/oracle/11.2.0/grid/cdata/cluster/day.ocr

rachost1 2014/04/03 03:25:47 /app/oracle/11.2.0/grid/cdata/cluster/week.ocr

rachost1 2014/04/16 11:40:47 /app/oracle/11.2.0/grid/cdata/cluster/backup_20140416_114047.ocr

 

5) Add new OCR disks

Note: Since OCR allows 1+4 OCR mirror files and we already have 3 existing OCR files, so we will add 2 new disks now and then later add 3rd one after removing existing disks

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -add /u04/racfiles/ocr

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck -config

Oracle Cluster Registry configuration is :

Device/File Name : /u01/racfiles/ocr

Device/File Name : /u02/racfiles/ocr

Device/File Name : /u03/racfiles/ocr

Device/File Name : /u04/racfiles/ocr

 

root@rachost1 # mkdir /u05/racfiles

root@rachost1 # chown root:dba /u05/racfiles

root@rachost1 # touch /u05/racfiles/ocr

root@rachost1 # chown root:dba /u05/racfiles/ocr

root@rachost1 # chmod 640 /u05/racfiles/ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -add /u05/racfiles/ocr

 

6) Check new OCR configuration

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck -config

Oracle Cluster Registry configuration is :

Device/File Name : /u01/racfiles/ocr

Device/File Name : /u02/racfiles/ocr

Device/File Name : /u03/racfiles/ocr

Device/File Name : /u04/racfiles/ocr

Device/File Name : /u05/racfiles/ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 3

Total space (kbytes) : 262120

Used space (kbytes) : 2632

Available space (kbytes) : 259488

ID : 1510948299

Device/File Name : /u01/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u02/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u03/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u04/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u05/racfiles/ocr

Device/File integrity check succeeded

Cluster registry integrity check succeeded

Logical corruption check succeeded

 

7) Delete existing OCR file

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -delete /u03/racfiles/ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 3

Total space (kbytes) : 262120

Used space (kbytes) : 2632

Available space (kbytes) : 259488

ID : 1510948299

Device/File Name : /u01/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u02/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u04/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u05/racfiles/ocr

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

 

8) Add new OCR files and delete remaining OCR files (if required)

root@rachost1 # mkdir /u06/racfiles

root@rachost1 # chown root:dba /u06/racfiles

root@rachost1 # touch /u06/racfiles/ocr

root@rachost1 # chown root:dba /u06/racfiles/ocr

root@rachost1 # chmod 640 /u06/racfiles/ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -add /u06/racfiles/ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -delete /u02/racfiles/ocr

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -delete /u01/racfiles/ocr

 

I) Check final OCR configuration after the addition and deletion

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck -config

Oracle Cluster Registry configuration is :

Device/File Name : /u04/racfiles/ocr

Device/File Name : /u05/racfiles/ocr

Device/File Name : /u06/racfiles/ocr

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 3

Total space (kbytes) : 262120

Used space (kbytes) : 2632

Available space (kbytes) : 259488

ID : 1510948299

Device/File Name : /u04/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u05/racfiles/ocr

Device/File integrity check succeeded

Device/File Name : /u06/racfiles/ocr

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check succeeded

 

9) Take another manual backup if required

root@rachost1 # /app/oracle/11.2.0/grid/bin/ocrconfig -manualbackup

 

rachost1 2014/04/16 12:04:10 /app/oracle/11.2.0/grid/cdata/cluster/backup_20140416_120410.ocr

rachost1 2014/04/16 11:40:47 /app/oracle/11.2.0/grid/cdata/cluster/backup_20140416_114047.ocr

 

 

Move Voting disks

 

For Voting disks (11gR2 onwards), we do not need to take backup since the backup is automatically taken during OCR backup and also during any add/delete operations for Voting disks. Also we do not need to prepare the disks in advance as we did for OCR disks

 

1) Check existing Voting Disks

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl query css votedisk

## STATE File Universal Id File Name Disk group

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

1. ONLINE a6b7e116f7fd4f7abfd1b85386655bde (/u01/racfiles/vdisk) []

2. ONLINE 627187c834d64fc0bf8bf27290054c13 (/u02/racfiles/vdisk) []

3. ONLINE 5242884e87334f58bf536e322ba9d557 (/u03/racfiles/vdisk) []

Located 3 voting disk(s).

 

2) Add new Voting Disks

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl add css votedisk /u04/racfiles/vdisk

Now formatting voting disk: /u04/racfiles/vdisk.

CRS-4603: Successful addition of voting disk /u04/racfiles/vdisk.

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl add css votedisk /u05/racfiles/vdisk

Now formatting voting disk: /u05/racfiles/vdisk.

CRS-4603: Successful addition of voting disk /u05/racfiles/vdisk.

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl add css votedisk /u06/racfiles/vdisk

Now formatting voting disk: /u06/racfiles/vdisk.

CRS-4603: Successful addition of voting disk /u06/racfiles/vdisk.

 

3) Check the new Voting disks configuration

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl query css votedisk

## STATE File Universal Id File Name Disk group

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

1. ONLINE a6b7e116f7fd4f7abfd1b85386655bde (/u01/racfiles/vdisk) []

2. ONLINE 627187c834d64fc0bf8bf27290054c13 (/u02/racfiles/vdisk) []

3. ONLINE 5242884e87334f58bf536e322ba9d557 (/u03/racfiles/vdisk) []

4. ONLINE 5e842268d1f34fd5bf2eee25a7529233 (/u04/racfiles/vdisk) []

5. ONLINE aa02617e01804fe7bf5cd40d5da6bc8e (/u05/racfiles/vdisk) []

6. ONLINE 0ac52c14753e4ff7bf79e8e013e530b6 (/u06/racfiles/vdisk) []

Located 6 voting disk(s).

4) Delete existing Voting Disks which were required to be moved

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl delete css votedisk /u03/racfiles/vdisk

CRS-4611: Successful deletion of voting disk /u03/racfiles/vdisk.

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl delete css votedisk /u02/racfiles/vdisk

CRS-4611: Successful deletion of voting disk /u02/racfiles/vdisk.

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl delete css votedisk /u01/racfiles/vdisk

CRS-4611: Successful deletion of voting disk /u01/racfiles/vdisk.

 

5) Check the new Voting disks configuration

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl query css votedisk

## STATE File Universal Id File Name Disk group

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

1. ONLINE 5e842268d1f34fd5bf2eee25a7529233 (/u04/racfiles/vdisk) []

2. ONLINE aa02617e01804fe7bf5cd40d5da6bc8e (/u05/racfiles/vdisk) []

3. ONLINE 0ac52c14753e4ff7bf79e8e013e530b6 (/u06/racfiles/vdisk) []

Located 3 voting disk(s).

 

6) Restart Cluster services to make sure that everything is fine after this movement

root@rachost1 # /app/oracle/11.2.0/grid/bin/crs_stop -all

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl stop crs

root@rachost2 # /app/oracle/11.2.0/grid/bin/crsctl stop crs

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/crsctl start crs

root@rachost2 # /app/oracle/11.2.0/grid/bin/crsctl start crs

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/crs_stat -t

Name Type Target State Host

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

ora….ER.lsnr ora….er.type OFFLINE OFFLINE

ora….N1.lsnr ora….er.type OFFLINE OFFLINE

ora….SM1.asm application OFFLINE OFFLINE

ora….01.lsnr application OFFLINE OFFLINE

ora….h01.gsd application OFFLINE OFFLINE

ora….h01.ons application ONLINE ONLINE rachost1

ora….h01.vip ora….t1.type OFFLINE OFFLINE

ora….SM2.asm application OFFLINE OFFLINE

ora….02.lsnr application OFFLINE OFFLINE

ora….h02.gsd application OFFLINE OFFLINE

ora….h02.ons application ONLINE ONLINE rachost2

ora….h02.vip ora….t1.type OFFLINE OFFLINE

ora.asm ora.asm.type OFFLINE OFFLINE

ora.eons ora.eons.type ONLINE ONLINE rachost1

ora.gsd ora.gsd.type OFFLINE OFFLINE

ora….network ora….rk.type ONLINE ONLINE rachost1

ora.oc4j ora.oc4j.type OFFLINE OFFLINE

ora.ons ora.ons.type ONLINE ONLINE rachost1

ora.scan1.vip ora….ip.type OFFLINE OFFLINE

 

root@rachost1 # /app/oracle/11.2.0/grid/bin/crs_start -all

root@rachost1 # /app/oracle/11.2.0/grid/bin/crs_stat -t

Name Type Target State Host

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

ora….ER.lsnr ora….er.type ONLINE ONLINE rachost1

ora….N1.lsnr ora….er.type ONLINE ONLINE rachost1

ora….SM1.asm application ONLINE ONLINE rachost1

ora….01.lsnr application ONLINE ONLINE rachost1

ora….h01.gsd application OFFLINE OFFLINE

ora….h01.ons application ONLINE ONLINE rachost1

ora….h01.vip ora….t1.type ONLINE ONLINE rachost1

ora….SM2.asm application ONLINE ONLINE rachost2

ora….02.lsnr application ONLINE ONLINE rachost2

ora….h02.gsd application OFFLINE OFFLINE

ora….h02.ons application ONLINE ONLINE rachost2

ora….h02.vip ora….t1.type ONLINE ONLINE rachost2

ora.asm ora.asm.type ONLINE ONLINE rachost1

ora.eons ora.eons.type ONLINE ONLINE rachost1

ora.gsd ora.gsd.type OFFLINE OFFLINE

ora….network ora….rk.type ONLINE ONLINE rachost1

ora.oc4j ora.oc4j.type OFFLINE OFFLINE

ora.ons ora.ons.type ONLINE ONLINE rachost1

ora.scan1.vip ora….ip.type ONLINE ONLINE rachost1

 

-bash-3.2$ srvctl status database -d dbname

Instance dbname1 is running on node rachost1

Instance dbname2 is running on node rachost2

No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>