Wednesday, June 30, 2010

Storage Migration on OCR and Voting Disk



Dear Viewer,

Recently I have done with renaming of OCR and Voting Disks during the Storage Migration.

Here are the high level action plan which I performed in our Non-Prod RAC instances as root user,

OCR :
===

ocrcheck
ocrconfig -export /oracle/export/CRS/OCR_Backup -s online <-- Taking OCR Backup -- Monitor the recent log file under $CRS_Home/log//client
ocrconfig -replace ocr /dev/mapper/tst-db-01-02_cluster_ocr_001_1000M
-- Monitor the recent log file under $CRS_Home/log//client
ocrconfig -replace ocrmirror /dev/mapper/tst-db-01-02_cluster_ocrmirr_002_1000M
-- Monitor the recent log file under $CRS_Home/log//client
ocrcheck

VOTING DISK :
============

crsctl stop crs
crsctl query css votedisk
crsctl add css votedisk /dev/mapper/tst-db-01-02_cluster_vote_003_1000M -force
crsctl add css votedisk /dev/mapper/tst-db-01-02_cluster_votemirr_004_1000M -force
crsctl delete css votedisk /dev/mapper/oraMFGSTGclus02_1708_42B2_voting_1000 -force
crsctl delete css votedisk /dev/mapper/oraMFGSTGclus02_1708_42B2_voting_1000 -force
crsctl start crs

-- Monitor /var/log/message file for any errors.

Session Log :
===========

Getting Current Status Information :
==================================

[root@tst-db-01 crs_home]# export PATH=$PATH:/oracle/product/crs_home/bin
[root@tst-db-01 crs_home]# clear
[root@tst-db-01 crs_home]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1048040
Used space (kbytes) : 3636
Available space (kbytes) : 1044404
ID : 1397237804
Device/File Name : /dev/mapper/MFGSTGclus02_1708_42B6_ocr_1000
Device/File integrity check succeeded
Device/File Name : /dev/mapper/MFGSTGclus02_1708_42B0_ocr_mirror1_1000
Device/File integrity check succeeded

Cluster registry integrity check succeeded

[root@tst-db-01 crs_home]# crsctl query css votedisk
0. 0 /dev/mapper/oraMFGSTGclus02_1708_42B2_voting_1000
1. 0 /dev/mapper/oraMFGSTGclus02_1708_42B3_voting_mirror1_1000

located 2 votedisk(s).
[root@tst-db-01 crs_home]# ps -eaf|grep pmon
root 943 31154 0 07:43 pts/0 00:00:00 grep pmon
[root@tst-db-01 crs_home]#

Voting Disk :
===========

1. Bring down the CRS

[root@tst-db-01 /]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.

2. Take the backup

[root@tst-db-01 /]# dd if=/dev/mapper/oraMFGSTGclus02_1708_42B2_voting_1000 of=/oracle/export/CRS/voting.dmp
2096640+0 records in
2096640+0 records out

[root@tst-db-01 /]# ls -l /oracle/export/CRS/voting.dmp
-rw-r--r-- 1 root root 1073479680 Jun 22 08:51 /oracle/export/CRS/voting.dmp

3. Add Voting Disk

[root@tst-db-01 /]# crsctl add css votedisk /dev/mapper/tst-db-01-02_cluster_vote_003_1000M -force
Now formatting voting disk: /dev/mapper/tst-db-01-02_cluster_vote_003_1000M
successful addition of votedisk /dev/mapper/tst-db-01-02_cluster_vote_003_1000M.

4. Add addition Voting Disk

[root@tst-db-01 /]# crsctl add css votedisk /dev/mapper/tst-db-01-02_cluster_votemirr_004_1000M -force
Now formatting voting disk: /dev/mapper/tst-db-01-02_cluster_votemirr_004_1000M
successful addition of votedisk /dev/mapper/tst-db-01-02_cluster_votemirr_004_1000M.

5. Deleting old Voting Disk

[root@tst-db-01 /]# crsctl delete css votedisk /dev/mapper/oraMFGSTGclus02_1708_42B2_voting_1000 -force
successful deletion of votedisk /dev/mapper/oraMFGSTGclus02_1708_42B2_voting_1000.

[root@tst-db-01 /]# crsctl delete css votedisk /dev/mapper/oraMFGSTGclus02_1708_42B3_voting_mirror1_1000 -force
successful deletion of votedisk /dev/mapper/oraMFGSTGclus02_1708_42B3_voting_mirror1_1000.

6. Bring up the CRS

[root@tst-db-01 /]# /etc/init.d/init.crs start
Startup will be queued to init within 30 seconds.
[root@tst-db-01 /]# tail -f /var/log/messages
Jun 22 08:58:47 tst-db-01 prashasi: Oracle Cluster Ready Services starting by user request.
Jun 22 08:59:00 tst-db-01 logger: Cluster Ready Services completed waiting on dependencies.
Jun 22 08:59:03 tst-db-01 last message repeated 2 times
Jun 22 08:59:03 tst-db-01 logger: Running CRSD with TZ =

7. Verify the CRS Services

[root@tst-db-01 /]# crsctl check crs

CSS appears healthy
Cannot communicate with CRS
EVM appears healthy

8. Verify the Voting Disk Changes

[root@tst-db-01 /]# crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
[root@tst-db-01 /]# crsctl query css votedisk
0. 0 /dev/mapper/tst-db-01-02_cluster_vote_003_1000M
1. 0 /dev/mapper/tst-db-01-02_cluster_votemirr_004_1000M

located 2 votedisk(s).


OCR Disk :
========

1. Take the backup

[root@tst-db-01 export]# cd /oracle/export
[root@tst-db-01 export]# cd CRS
[root@tst-db-01 CRS]# ocrconfig -export /oracle/export/CRS/OCR_Backup -s online

2. Add the OCR and OCR Mirror Disk

[root@tst-db-01 CRS]# ls -l /dev/mapper/tst-db-01-02_cluster_ocr_001_1000M
brw-rw---- 1 root disk 253, 385 Jun 21 12:18 /dev/mapper/tst-db-01-02_cluster_ocr_001_1000M
[root@tst-db-01 CRS]# ocrconfig -replace ocr /dev/mapper/tst-db-01-02_cluster_ocr_001_1000M
[root@tst-db-01 CRS]# ocrconfig -replace ocrmirror /dev/mapper/tst-db-01-02_cluster_ocrmirr_002_1000M

3. Verify the OCR Changes

[root@tst-db-01 CRS]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1048040
Used space (kbytes) : 3636
Available space (kbytes) : 1044404
ID : 1397237804
Device/File Name : /dev/mapper/tst-db-01-02_cluster_ocr_001_1000M
Device/File integrity check succeeded
Device/File Name : /dev/mapper/tst-db-01-02_cluster_ocrmirr_002_1000M
Device/File integrity check succeeded

Cluster registry integrity check succeeded

[root@tst-db-01 CRS]#


Regards,
Sasikumar.M

No comments:

Post a Comment