11 gR 2 ocr votediskのリカバリテスト
17340 ワード
まずいくつかの検査をします。
1.ocrの整合性の確認
root@oeltan1 ~]# su - grid[grid@oeltan1 ~]$
cluvfy comp ocr -n all
Verifying OCR integrity
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations
ASM Running check passed. ASM is running on all specified nodes
Checking OCR config file "/etc/oracle/ocr.loc"...
OCR config file "/etc/oracle/ocr.loc" check successful
Disk group for ocr location "+CRS" available on all the nodes
Disk group for ocr location "+DATA1" available on all the nodes
NOTE:
This check does not verify the integrity of the OCR contents. Execute 'ocrcheck' as a privileged user to verify the contents of OCR.
OCR integrity check passed
Verification of OCR integrity was successful.
[grid@oeltan1 ~]$
ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3320
Available space (kbytes) : 258800
ID : 1360300110
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +DATA1
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
2.votediskのチェック
[grid@oeltan1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 2141c8c7d8904f89bfa45dbaecb827c5 (/dev/asm-diskb) [CRS]
Located 1 voting disk(s).
3ディスクの使用状況を確認する
1* select name,header_status,path from V$asm_diskSQL>/
NAME HEADER_STATU PATH
------------------------------ ------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CRS_0000 MEMBER /dev/asm-diskb
DATA1_0002 MEMBER /dev/asm-diskg
DATA1_0001 MEMBER /dev/asm-diskf
DATA1_0000 MEMBER /dev/asm-diske
CRS_0002 MEMBER /dev/asm-diskd
CRS_0001 MEMBER /dev/asm-diskc
FRI_0000 MEMBER /dev/asm-diskh
FRI_0001 MEMBER /dev/asm-diski
FRI_0002 MEMBER /dev/asm-diskj
バックアップ
11 g中votediskはバックアップ不要
1 ASMspfileのバックアップ
SQL> create pfile='/tmp/asm_pfile_0724.txt' from spfile2バックアップocr
[root@oeltan1 ~]# ocrconfig -manualbackup3バックアップの確認:
[root@oeltan1 ~]# ocrconfig -showbackupoeltan1 2013/07/24 11:18:08 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup00.ocr
oeltan1 2013/07/24 07:18:02 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup01.ocr
oeltan1 2013/07/24 03:17:54 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup02.ocr
oeltan1 2013/07/23 07:17:31 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/day.ocr
oeltan1 2013/07/12 07:14:46 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/week.ocr
oeltan1 2013/07/23 11:17:30 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup_20130723_111730.ocr
oeltan1 2013/07/23 11:15:00 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup_20130723_111500.ocr
oeltan1 2013/07/18 10:36:48 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup_20130718_103648.ocr
oeltan1 2013/07/18 10:36:30 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup_20130718_103630.ocr
oeltan2 2013/06/17 09:04:34 /apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup_20130617_090434.ocr
CRSディスクを3枚破壊
破壊し始めたぞ..
[root@oeltan2 ~]# dd if=/dev/zero of=/dev/asm-dskb bs=1024 count=1000
[root@oeltan2 ~]# dd if=/dev/zero of=/dev/asm-dskc bs=1024 count=1000
[root@oeltan2 ~]# dd if=/dev/zero of=/dev/asm-dskd bs=1024 count=1000
チェック:
[root@oeltan1 ~]# ocrcheck
PROT-601: Failed to initialize ocrcheck
PROC-22: The OCR backend has an invalid format
リストアの開始:
1.CRSの強制停止
[root@oeltan1 ~]# crsctl stop crs -fCRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oeltan1'
CRS-4133: Oracle High Availability Services has been stopped.
上の時間はちょっと長いですが、10分以上かかります.
ノード2も停止
2.排他モードで起動:
[root@oeltan1 ~]#crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.mdnsd' on 'oeltan1'
CRS-2676: Start of 'ora.mdnsd' on 'oeltan1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'oeltan1'
CRS-2676: Start of 'ora.gpnpd' on 'oeltan1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'oeltan1'
CRS-2672: Attempting to start 'ora.gipcd' on 'oeltan1'
CRS-2676: Start of 'ora.cssdmonitor' on 'oeltan1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'oeltan1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'oeltan1'
CRS-2672: Attempting to start 'ora.diskmon' on 'oeltan1'
CRS-2676: Start of 'ora.diskmon' on 'oeltan1' succeeded
CRS-2676: Start of 'ora.cssd' on 'oeltan1' succeeded
CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'oeltan1'
CRS-2672: Attempting to start 'ora.ctssd' on 'oeltan1'
CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'oeltan1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'oeltan1'
CRS-2676: Start of 'ora.ctssd' on 'oeltan1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'oeltan1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'oeltan1'
CRS-2676: Start of 'ora.asm' on 'oeltan1' succeeded
3.CRSディスクグループの作成
[grid@oeltan1 ~]$ asmcmdASMCMD> ls
ASMCMD>
[grid@oeltan1 ~]$ sqlplus/as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 26 09:33:13 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
SQL>
create diskgroup crsvote normal redundancy disk '/dev/asm-diskb','/dev/asm-diskc','/dev/asm-diskd' 2 attribute 'compatible.asm'='11.2.0.0.0','compatible.rdbms'='11.2.0.0.0';
Diskgroup created.
4.またspfile
SQL> create spfile='+CRSVOTE' from pfile='/tmp/asm_pfile_0724.txt';File created.
ASMCMD> pwd
+CRSVOTE/oeltan-cluster/ASMPARAMETERFILE
ASMCMD> ls
REGISTRY.253.821785057
5.ocr.の修正loc,ノード2も変更する.
[root@oeltan1 ~]# vi/etc/oracle/ocr.loc#Device/file +DATA1 being deleted
ocrconfig_loc=+CRSVOTE
local_only=false
6.OCRのインポート
# ocrconfig -restore/apps/grid/gridhome/11.2.0/grid/cdata/oeltan-cluster/backup_20130723_111730.ocrASMCMD> pwd
+CRSVOTE/oeltan-cluster
ASMCMD> ls
ASMPARAMETERFILE/
OCRFILE/
OCRの確認
[root@oeltan1 ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3320
Available space (kbytes) : 258800
ID : 1360300110
Device/File Name : +CRSVOTE
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
7.VOTE DISKの修復
[root@oeltan1 ~]# crsctl query css votediskLocated 0 voting disk(s).
[root@oeltan1 ~]#
[root@oeltan1 ~]# crsctl replace votedisk +CRSVOTE
CRS-4602: Failed 27 to add voting file 66d2624128ee4fd2bf882a8a3d295a99.
CRS-4602: Failed 27 to add voting file 1d4cf4ec74794f05bfc8f3f452cddfaf.
CRS-4602: Failed 27 to add voting file 731c37abf7fa4fc0bf6219155cf0e7e0.
Failed to replace voting disk group with +CRSVOTE.
CRS-4000: Command Replace failed, or completed with errors.
[root@oeltan1 ~]# crsctl query css votedisk
Located 0 voting disk(s).
上のエラーはasm_diskstringの構成が正しくありません:
チェック:
SQL> show parameter asm
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string CRSVOTE
asm_diskstring string
asm_power_limit integer 1
asm_preferred_read_failure_groups string
変更
SQL> alter system set asm_diskstring='/dev/asm*' scope=both;
ASMの再起動が必要
上記の問題のより詳細な解決プロセス:http://blog.csdn.net/tanqingru/article/details/9493703
もう一度お願いしますvotedisk
[root@oeltan1 ~]#
crsctl replace votedisk +CRSVOTE
Successful addition of voting disk 54e90342890c4f58bf319f3c57c4acd7.
Successful addition of voting disk 5103d7e756f14f69bf3935ace34e5de7.
Successful addition of voting disk 370645ed11324fe5bf99eac9bf5efb21.
Successfully replaced voting disk group with +CRSVOTE.
CRS-4266: Voting file(s) successfully replaced
[root@oeltan1 ~]#
crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 54e90342890c4f58bf319f3c57c4acd7 (/dev/asm-diskb) [CRSVOTE]
2. ONLINE 5103d7e756f14f69bf3935ace34e5de7 (/dev/asm-diskc) [CRSVOTE]
3. ONLINE 370645ed11324fe5bf99eac9bf5efb21 (/dev/asm-diskd) [CRSVOTE]
Located 3 voting disk(s).
CRSの再起動
1.crsをチェック
[root@oeltan1 ~]# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4534: Cannot communicate with Event Manager
2.正常に再起動する
crsctl stop crscrsctl start crs
ノード2も起動します.
[root@oeltan2 tmp]# crsctl start crs
3.crsをチェックする
[root@oeltan1 ~]# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
リカバリ後のチェック
1最終検査:
[root@oeltan1 tmp]#crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE OFFLINE
ora.DATA1.dg ora....up.type ONLINE ONLINE oeltan1
ora.FRI.dg ora....up.type ONLINE ONLINE oeltan1
ora....ER.lsnr ora....er.type ONLINE ONLINE oeltan2
ora....N1.lsnr ora....er.type ONLINE ONLINE oeltan2
ora.asm ora.asm.type ONLINE ONLINE oeltan1
ora.cvu ora.cvu.type ONLINE ONLINE oeltan1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE oeltan1
ora.oc4j ora.oc4j.type ONLINE ONLINE oeltan1
ora....SM1.asm application ONLINE ONLINE oeltan1
ora....N1.lsnr application ONLINE OFFLINE
ora....an1.gsd application OFFLINE OFFLINE
ora....an1.ons application ONLINE ONLINE oeltan1
ora....an1.vip ora....t1.type ONLINE ONLINE oeltan2
ora....SM2.asm application ONLINE ONLINE oeltan2
ora....N2.lsnr application ONLINE ONLINE oeltan2
ora....an2.gsd application OFFLINE OFFLINE
ora....an2.ons application ONLINE ONLINE oeltan2
ora....an2.vip ora....t1.type ONLINE ONLINE oeltan2
ora.ons ora.ons.type ONLINE ONLINE oeltan1
ora.scan1.vip ora....ip.type ONLINE ONLINE oeltan2
ora.scan2.vip ora....ip.type ONLINE ONLINE oeltan2
ora.scan3.vip ora....ip.type ONLINE ONLINE oeltan2
ora.tantest.db ora....se.type ONLINE ONLINE oeltan1
ora....tag.svc ora....ce.type ONLINE ONLINE oeltan2
[root@oeltan1 tmp]#
crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRS.dg
ONLINE OFFLINE oeltan1
OFFLINE OFFLINE oeltan2
ora.DATA1.dg
ONLINE ONLINE oeltan1
ONLINE ONLINE oeltan2
ora.FRI.dg
ONLINE ONLINE oeltan1
ONLINE ONLINE oeltan2
ora.LISTENER.lsnr
ONLINE OFFLINE oeltan1
ONLINE ONLINE oeltan2
ora.asm
ONLINE ONLINE oeltan1 Started
ONLINE ONLINE oeltan2 Started
ora.gsd
OFFLINE OFFLINE oeltan1
OFFLINE OFFLINE oeltan2
ora.net1.network
ONLINE ONLINE oeltan1
ONLINE ONLINE oeltan2
ora.ons
ONLINE ONLINE oeltan1
ONLINE ONLINE oeltan2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE oeltan2
ora.cvu
1 ONLINE ONLINE oeltan1
ora.oc4j
1 ONLINE ONLINE oeltan1
ora.oeltan1.vip
1 ONLINE INTERMEDIATE oeltan2 FAILED OVER
ora.oeltan2.vip
1 ONLINE ONLINE oeltan2
ora.scan1.vip
1 ONLINE ONLINE oeltan2
ora.scan2.vip
1 ONLINE ONLINE oeltan2
ora.scan3.vip
1 ONLINE ONLINE oeltan2
ora.tantest.db
1 ONLINE ONLINE oeltan1 Open
2 ONLINE ONLINE oeltan2 Open
ora.tantest.tantag.svc
1 ONLINE OFFLINE
2 ONLINE ONLINE oeltan2
ASMCMD> ls
CRSVOTE/
DATA1/
FRI/