溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

ORACLE11GR2 RAC文件系統(tǒng)變更成ASM EXTEND RAC及高可用測試

發(fā)布時間:2020-08-10 14:42:53 來源:ITPUB博客 閱讀:311 作者:huangdazhu 欄目:關(guān)系型數(shù)據(jù)庫


本來一直都有玩下ASM EXTEND RAC這樣的想法,苦于沒有資源測試,等。。。。。
老天不負有心人啊~哈哈!終于有資源玩了。
2套存儲:EMS跟HDS,分別放在不同的機房。
由于原測試系統(tǒng)用的是文件系統(tǒng),故要將其先改為ASM,再創(chuàng)建ASM EXTEND RAC。
此次修改成ASM EXTEND RAC遇到一系列問題,雖然解決這些問題有過苦惱,但EXTEND RAC成功完成之后,有種莫名的成就感,
各位看官大問題解決之后有木有同感~ 呵呵

1.系統(tǒng)環(huán)境

1.1 OS及DB版本

主機OS版本:AIX 7.1 ("7100-02-03-1334")

ORACLE版本:oracle 11.2.0.3 PSU10

是否RAC:是

節(jié)點個數(shù):4

存儲:HDS 100G,EMS 50G

ASM或文件系統(tǒng):賽門鐵克VERITAS卷管理工具搭建集群文件系統(tǒng)

1.2 硬件

    RAM : 128

    SWAP: 13G

1.3 AIX /TMP文件系統(tǒng)

    8GB

1.4 AIX JDK & JRE

   IBM JDK 1.6.0.00 (64 BIT)

1.5 目錄詳細

/oracle 50GB   

/oraclelog 30GB

/ocrvote  2G

/archivelog  400G

/oradata  850

1.6 主機IP配置信息

100.15.64.180   testdb1

100.15.64.181   testdb2

100.15.64.182   testdb3

100.15.64.183   testdb4

100.15.64.184   testdb1-vip

100.15.64.185   testdb2-vip

100.15.64.186   testdb3-vip

100.15.64.187   testdb4-vip

100.15.64.188   testdb-scan

7.154.64.1      testdb1-priv

7.154.64.2      testdb2-priv

7.154.64.3      testdb3-priv

7.154.64.4      testdb4-priv


2文件系統(tǒng)更換成ASM

2.1磁盤權(quán)限及屬性修改

chown grid:asmadmin /dev/vx/rdmp/remc0_04a1

chown grid:asmadmin /dev/vx/rdmp/rhitachi_v0_11cd

chmod 660 /dev/vx/rdmp/remc0_04a1

chmod 660 /dev/vx/rdmp/rhitachi_v0_11cd

(注:由于測試庫使用的是賽門鐵克的存儲多路徑軟件,故無需修改磁盤屬性)

2.2創(chuàng)建ASM實例

su – grid

export DISPLAY=100.15.70.169:0.0

asmca

(注:創(chuàng)建OCTVOTE磁盤組選NORMAL冗余,創(chuàng)建2個故障組,最少3塊磁盤,建議選用3塊磁盤,當asm的故障組如果有多余3塊盤,votedisk遷移到這個磁盤組也只用其中的3塊盤。使用crsctl query css votedisk只看到votedisk放在3塊盤上。磁盤組的可用空間以其故障組總大小最小的為準)
ORACLE11GR2 RAC文件系統(tǒng)變更成ASM EXTEND RAC及高可用測試

2.3創(chuàng)建ASM磁盤組SYSDG,DATADG并修改磁盤組參數(shù)

su – grid

export DISPLAY=100.15.70.169:0.0

asmca

ORACLE11GR2 RAC文件系統(tǒng)變更成ASM EXTEND RAC及高可用測試
ORACLE11GR2 RAC文件系統(tǒng)變更成ASM EXTEND RAC及高可用測試

注:同一邊的存儲放在一個故障組中。

oracle 11G之后的ASM需要將rdbmscompatible參數(shù)修改為11.2.0.0,這個參數(shù)默認的是10.2.0.0,如果這個參數(shù)不修改,后面如果使用兩個故障組,其中一個故障組故障修復(fù)后,將故障組在線online的時候會報如下錯:

ORA-15283: ASM operation requires compatible.rdbms of 11.1.0.0.0 or higher

修改命令:

alter diskgroup SYSDG set attribute 'compatible.rdbms'='11.2.0.0';

select name,COMPATIBILITY,DATABASE_COMPATIBILITY from v$asm_diskgroup;  

----compatibility對應(yīng)asm的版本,

DATABASE_COMPATIBILITY  ---  兼容數(shù)據(jù)庫版本

2.4將文件系統(tǒng)數(shù)據(jù)文件遷移至ASM

    因為本次測試沒建庫,所以不涉及數(shù)據(jù)文件遷移,如需遷移,使用RMAN實現(xiàn)。

2.5OCR,VOTEDISK遷移至磁盤組OCRVOTE

       1)查看ocrvotedisk

root@testdb1:/#/oracle/app/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          3

Total space (kbytes)     :     262120

Used space (kbytes)      :       3296

Available space (kbytes) :     258824

ID                       : 1187520997

Device/File Name         : /ocrvote/ocr1

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

 

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

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   a948649dc0e14f65bf171ba2ca496962 (/ocrvote/votedisk1) []

 2. ONLINE   a5f290d560684f47bf82eb3d34db5fc7 (/ocrvote/votedisk2) []

 3. ONLINE   49617fb984fc4fcdbf5b7566a9e1778f (/ocrvote/votedisk3) []

Located 3 voting disk(s).

       2)查看資源狀態(tài)

$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATADG.dg

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                     

ONLINE  ONLINE       testdb3                                     

ONLINE  ONLINE       testdb4                                     

ora.LISTENER.lsnr

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                      

ONLINE  ONLINE       testdb3                                     

ONLINE  ONLINE       testdb4                                     

ora.OCRVOTE.dg

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                      

ONLINE  ONLINE       testdb3                                     

ONLINE  ONLINE       testdb4                                     

ora.SYSDG.dg

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                     

ONLINE  ONLINE       testdb3                                     

ONLINE  ONLINE       testdb4                                     

ora.asm

ONLINE  ONLINE       testdb1                 Started            

ONLINE  ONLINE       testdb2                  Started            

ONLINE  ONLINE       testdb3                  Started            

ONLINE  ONLINE       testdb4                  Started             

ora.gsd

OFFLINE OFFLINE      testdb1                                     

OFFLINE OFFLINE      testdb2                                     

OFFLINE OFFLINE      testdb3                                     

OFFLINE OFFLINE      testdb4                                      

ora.net1.network

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                     

ONLINE  ONLINE       testdb3                                     

ONLINE  ONLINE       testdb4                                     

ora.ons

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                     

ONLINE  ONLINE       testdb3                                      

ONLINE  ONLINE       testdb4                                     

ora.registry.acfs

ONLINE  ONLINE       testdb1                                     

ONLINE  ONLINE       testdb2                                     

ONLINE  ONLINE       testdb3                                     

ONLINE  ONLINE       testdb4                                     

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE       testdb1                                     

ora.cvu

1        ONLINE  ONLINE       testdb1                                     

ora.oc4j

1        ONLINE  ONLINE       testdb1                                     

ora.scan1.vip

1        ONLINE  ONLINE       testdb1                                     

ora.testdb1.vip

1        ONLINE  ONLINE       testdb1                                      

ora.testdb2.vip

1        ONLINE  ONLINE       testdb2                                     

ora.testdb3.vip

1        ONLINE  ONLINE       testdb3                                     

ora.testdb4.vip

              1        ONLINE  ONLINE       testdb4  

       3)備份OCR

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

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

       4)OCR增加到磁盤組中并刪除原有文件系統(tǒng)中的OCR

root@testdb1:/#/oracle/app/11.2.0/grid/bin/ocrconfig -add +OCRVOTE

root@testdb1:/#/oracle/app/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          3

         Total space (kbytes)     :     262120

         Used space (kbytes)      :       3336

         Available space (kbytes) :     258784

         ID                       : 1187520997

         Device/File Name         : /ocrvote/ocr1

                                    Device/File integrity check succeeded

         Device/File Name         :   +OCRVOTE

                                    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 succeeded

 

root@testdb1:/#/oracle/app/11.2.0/grid/bin/ocrconfig -delete /ocrvote/ocr1

root@testdb1:/#/oracle/app/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          3

         Total space (kbytes)     :     262120

         Used space (kbytes)      :       3336

         Available space (kbytes) :     258784

         ID                       : 1187520997

         Device/File Name         :   +OCRVOTE

                                    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

       5)votedisk遷移至文件系統(tǒng)中

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

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   a948649dc0e14f65bf171ba2ca496962 (/ocrvote/votedisk1) []

 2. ONLINE   a5f290d560684f47bf82eb3d34db5fc7 (/ocrvote/votedisk2) []

 3. ONLINE   49617fb984fc4fcdbf5b7566a9e1778f (/ocrvote/votedisk3) []

Located 3 voting disk(s).

root@testdb1:/#/oracle/app/11.2.0/grid/bin/crsctl replace  votedisk +OCRVOTE

CRS-4256: Updating the profile

Successful addition of voting disk 3a5e5e8622024f17bf0c1a4594e303f5.

Successful addition of voting disk 92ff4555f7064f70bf3c022bd687dbc5.

Successful addition of voting disk 19a1fed74b7f4fb6bf780d43b5427dc9.

Successful deletion of voting disk a948649dc0e14f65bf171ba2ca496962.

Successful deletion of voting disk a5f290d560684f47bf82eb3d34db5fc7.

Successful deletion of voting disk 49617fb984fc4fcdbf5b7566a9e1778f.

Successfully replaced voting disk group with +OCRVOTE.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfully replaced

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

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   3a5e5e8622024f17bf0c1a4594e303f5 (/dev/vx/rdmp/emc0_04a1) [OCRVOTE]

 2. ONLINE   92ff4555f7064f70bf3c022bd687dbc5 (/dev/vx/rdmp/hitachi_vsp0_11cc) [OCRVOTE]

 3. ONLINE   19a1fed74b7f4fb6bf780d43b5427dc9 (/dev/vx/rdmp/emc0_04c1) [OCRVOTE]

Located 3 voting disk(s).

3.NFS添加至磁盤組OCTVOTE中,作為第三塊仲裁盤

asm extend rac需要在2套存儲之外的地方放置一臺linuxpc server,并需要在這臺server上創(chuàng)建一個文件系統(tǒng)。   將此文件系統(tǒng)以NFS形式掛載到asm extend rac服務(wù)器端,NFS上需要使用dd命令生成盤。

3.1NFS服務(wù)器信息

系統(tǒng)版本:Linux el5 x86_64

3.2NFS服務(wù)器創(chuàng)建grid用戶

groupadd -g 1000 oinstall

groupadd -g 1100 asmadmin

useradd -u 1100 -g oinstall -G oinstall,asmadmin -d /home/grid -c "GRID Software Owner" grid

注:建議nfs服務(wù)器用戶ID、組ID跟生產(chǎn)庫一致

3.3NFS服務(wù)器創(chuàng)建目錄并賦權(quán),DD出一個盤

    cd /oradata

    mkdir votedisk

chown 1100:1100 votedisk

   

3.4修改NFS服務(wù)器上的/etc/exports文件,并重啟NFS

    vi /etc/exports

    新增如下行

    /oradata/votedisk *(rw,sync,all_squash,anonuid=1100,anongid=1100)

service nfs stop

service nfs start

3.5查看nfs是否包含新增的votedisk目錄

[root@ywtcdb ~]# exportfs -v

/oradata        100.15.64.*(rw,wdelay,no_root_squash,no_subtree_check,anonuid=65534,anongid=65534)

/oradata/votedisk

                <world>(rw,wdelay,root_squash,all_squash,no_subtree_check,anonuid=1100,anongid=1100)

(注:紅色部分為新增部分)

3.6修改生產(chǎn)主機的/etc/filesystems文件,將目錄設(shè)為自動隨機掛載(每個節(jié)點運行)

su - root

mkdir /voting_disk

chown grid:asmadmin /voting_disk

vi /etc/filesystems

新增如下內(nèi)容:

/voting_disk:

        dev             = "/oradata/votedisk"

        vfs             = nfs

        nodename        = ywtcdb

        mount           = true

        options         = rw,bg,hard,intr,rsize=32768,wsize=32768,timeo=600,vers=3,proto=tcp,noac,sec=sys

        account         = false

(注:嚴格按照/etc/filesystems的已有選項進行配置,包括標點符號,空格等,建議使用smit nfs命令進行nfs配置,并在命令配置完成之后修改/etc/filesystems文件中對應(yīng)掛載目錄的options屬性,options屬性必須是rw,bg,hard,intr,rsize=32768,wsize=32768,timeo=600,vers=3,proto=tcp,noac,sec=sys)

使用smit nfs命令設(shè)置啟動自動掛載nfs

#smit nfs

[TOP]                                                   [Entry Fields]

* Pathname of mount point                            [/voting_disk]

* Pathname of remote directory                       [/oradata/votedisk]

* Host where remote directory resides                [ywtcdb]

  Mount type name                                    []

* Security method                                    [sys]

* Mount now, add entry to /etc/filesystems or both?   both

* /etc/filesystems entry will mount the directory     yes

 

3.7手動掛載目錄(每個節(jié)點運行)

/usr/sbin/nfso –p -o nfs_use_reserved_ports=1

nfso -p -o nfs_use_reserved_ports=1

su - root

mount  -v nfs -o rw,bg,hard,intr,rsize=32768,wsize=32768,timeo=600,vers=3,proto=tcp,noac,sec=sys 100.15.57.125:/oradata/votedisk /voting_disk

:命令中的100.15.57.125NFS服務(wù)器的IP, /oradata/votediskNFS服務(wù)器的目錄,/voting_disk為生產(chǎn)主機的目錄。

3.8使用dd命令生成一塊盤(任一生產(chǎn)節(jié)點)

dd if=/dev/zero of=/voting_disk/vote_disk_nfs bs=1M count=1000

3.9將新生成盤加到磁盤組OCRVOTE

su – grid

export DISPLAY=100.15.70.169:0.0

asmca

asmca中要先改變Disk Discovery Path

修改前:

/dev/vx/rdmp/*

修改后:

/voting_disk/vote_disk_nfs, /dev/vx/rdmp/*

將盤/voting_disk/vote_disk_nfs加到磁盤組OCRVOTE中的一個新的故障組中,添加完成之后我們可以看到磁盤組OCRVOTE3個故障組。


ORACLE11GR2 RAC文件系統(tǒng)變更成ASM EXTEND RAC及高可用測試ORACLE11GR2 RAC文件系統(tǒng)變更成ASM EXTEND RAC及高可用測試

3.10檢查votedisk是否在新增盤上

$ crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   89210622f0864ff0bf9517205691e679 (/voting_disk/vote_disk_nfs) [OCRVOTE]

 2. ONLINE   55c4ee685a824ff3bf6ce510bf09468e (/dev/vx/rdmp/remc0_04a1) [OCRVOTE]

 3. ONLINE   159234e88fe64f55bf0d4571362c3b07 (/dev/vx/rdmp/ rhitachi_v0_11cd) [OCRVOTE]

Located 3 voting disk(s).

3.11開始建庫,建庫完成之后,至此ASM EXTEND RAC創(chuàng)建完成

4.ASM EXTEND RAC高可用測試

4.1 拔掉節(jié)點1、節(jié)點2EMC存儲光纖,模擬一邊存儲宕掉

css日志如下:

節(jié)點1:

2014-05-20 14:46:44.886:

[cssd(4129042)]CRS-1649:An I/O error occured for voting file: /dev/remc0_04a5; details at (:CSSNM00060:) in /oracle/app/11.2.0/grid/log/testdb1/cssd/ocssd.log.

2014-05-20 14:46:44.886:

[cssd(4129042)]CRS-1649:An I/O error occured for voting file: /dev/remc0_04a5; details at (:CSSNM00059:) in /oracle/app/11.2.0/grid/log/testdb1/cssd/ocssd.log.

2014-05-20 14:46:46.051:

[cssd(4129042)]CRS-1626:A Configuration change request completed successfully

2014-05-20 14:46:46.071:

[cssd(4129042)]CRS-1601:CSSD Reconfiguration complete. Active nodes are testdb1 testdb2 testdb3 testdb4 .

 

節(jié)點2

2014-05-20 14:46:46.053:

[cssd(4195026)]CRS-1604:CSSD voting file is offline: /dev/remc0_04a5; details at (:CSSNM00069:) in /oracle/app/11.2.0/grid/log/testdb2/cssd/ocssd.log.

2014-05-20 14:46:46.053:

[cssd(4195026)]CRS-1626:A Configuration change request completed successfully

2014-05-20 14:46:46.071:

[cssd(4195026)]CRS-1601:CSSD Reconfiguration complete. Active nodes are testdb1 testdb2 testdb3 testdb4 .

 

節(jié)點3

2014-05-20 14:46:46.053:

[cssd(3604942)]CRS-1604:CSSD voting file is offline: /dev/remc0_04a5; details at (:CSSNM00069:) in /oracle/app/11.2.0/grid/log/testdb3/cssd/ocssd.log.

2014-05-20 14:46:46.053:

[cssd(3604942)]CRS-1626:A Configuration change request completed successfully

2014-05-20 14:46:46.074:

[cssd(3604942)]CRS-1601:CSSD Reconfiguration complete. Active nodes are testdb1 testdb2 testdb3 testdb4 .

 

節(jié)點4

2014-05-20 14:46:46.053:

[cssd(3015132)]CRS-1604:CSSD voting file is offline: /dev/remc0_04a5; details at (:CSSNM00069:) in /oracle/app/11.2.0/grid/log/testdb4/cssd/ocssd.log.

2014-05-20 14:46:46.053:

[cssd(3015132)]CRS-1626:A Configuration change request completed successfully

2014-05-20 14:46:46.073:

[cssd(3015132)]CRS-1601:CSSD Reconfiguration complete. Active nodes are testdb1 testdb2 testdb3 testdb4 .

 

CRS狀態(tài)正常:

testdb3:/oracle/app/11.2.0/grid/log/testdb3/cssd(testdb3)$/oracle/app/11.2.0/grid/bin/crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS      

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATADG.dg

               ONLINE  ONLINE       testdb1                                     

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

ora.LISTENER.lsnr

               ONLINE  ONLINE       testdb1                                     

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

ora.OCRVOTE.dg

               ONLINE  ONLINE       testdb1                                      

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

ora.SYSDG.dg

               ONLINE  ONLINE       testdb1                                     

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

ora.asm

               ONLINE  ONLINE       testdb1                  Started            

               ONLINE  ONLINE       testdb2                  Started            

               ONLINE  ONLINE       testdb3                  Started            

               ONLINE  ONLINE       testdb4                  Started            

ora.gsd

               OFFLINE OFFLINE      testdb1                                     

               OFFLINE OFFLINE      testdb2                                     

               OFFLINE OFFLINE      testdb3                                     

               OFFLINE OFFLINE      testdb4                                     

ora.net1.network

               ONLINE  ONLINE       testdb1                                     

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

ora.ons

               ONLINE  ONLINE       testdb1                                     

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

ora.registry.acfs

               ONLINE  ONLINE       testdb1                                     

               ONLINE  ONLINE       testdb2                                     

               ONLINE  ONLINE       testdb3                                     

               ONLINE  ONLINE       testdb4                                     

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       testdb4          

ora.cvu

      1        ONLINE  ONLINE       testdb3                                     

ora.oc4j

      1        ONLINE  ONLINE       testdb3                                     

ora.scan1.vip

      1        ONLINE  ONLINE       testdb4                                      

ora.testdb.db

      1        ONLINE  ONLINE       testdb1                  Open               

      2        ONLINE  ONLINE       testdb2                  Open               

      3        ONLINE  ONLINE       testdb3                  Open               

      4        ONLINE  ONLINE       testdb4                  Open               

ora.testdb1.vip

      1        ONLINE  ONLINE       testdb1                                      

ora.testdb2.vip

      1        ONLINE  ONLINE       testdb2                                     

ora.testdb3.vip

      1        ONLINE  ONLINE       testdb3                                     

ora.testdb4.vip

      1        ONLINE  ONLINE       testdb4 

 

查看votedisk如下:

$ /oracle/app/11.2.0/grid/bin/crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   8a31ddf5013d4fb1bfdbb01d6fc6eb7b (/dev/rhitachi_v0_11cc) [OCRVOTE]

 2. ONLINE   1ef9486d54b24f8cbf07814d2848a009 (/voting_disk/vote_disk_nfs) [OCRVOTE]

Located 2 voting disk(s).

 

當把存儲光纖插回去之后手動online磁盤,兩邊存儲會自動同步數(shù)據(jù)

alter diskgroup SYSDG  online disks in failgroup fail_1;

alter diskgroup DATADG  online disks in failgroup fail_1;

 

測試結(jié)果

所有EMC存儲在各節(jié)點ASM磁盤組中都自動OFFLINE,保留HDS存儲,各節(jié)點實例正常。在測試中我們拔掉hds存儲光纖,現(xiàn)象跟拔掉EMS存儲光纖一致。由此可以得出:當一邊存儲宕掉之后,ASM EXTEND RAC保留好的那邊存儲,各節(jié)點實例均正常。當把存儲光纖插回去之后手動online磁盤,兩邊存儲會自動同步數(shù)據(jù)。

注:存放votedisk的磁盤組在磁盤掛回來之后會自動online磁盤

 

4.2 reboot節(jié)點1、2主機,模擬主機突然宕掉故障

reboot節(jié)點1、2主機,查看crs資源狀態(tài)如下:

$ crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.ARCHDG.dg

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.DATADG.dg

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.LISTENER.lsnr

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.OCRVOTE.dg

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.SYSDG.dg

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.asm

               ONLINE  ONLINE       testdb3                  Started

               ONLINE  ONLINE       testdb4                  Started

ora.gsd

               OFFLINE OFFLINE      testdb3

               OFFLINE OFFLINE      testdb4

ora.net1.network

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.ons

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.registry.acfs

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       testdb3

ora.cvu

      1        ONLINE  ONLINE       testdb3

ora.oc4j

      1        ONLINE  ONLINE       testdb3

ora.scan1.vip

      1        ONLINE  ONLINE       testdb3

ora.testdb.db

      1        ONLINE  OFFLINE

      2        ONLINE  OFFLINE

      3        ONLINE  ONLINE       testdb3                  Open

      4        ONLINE  ONLINE       testdb4                  Open

ora.testdb1.vip

      1        ONLINE  INTERMEDIATE testdb4                  FAILED OVER

ora.testdb2.vip

      1        ONLINE  INTERMEDIATE testdb3                  FAILED OVER

ora.testdb3.vip

      1        ONLINE  ONLINE       testdb3

ora.testdb4.vip

      1        ONLINE  ONLINE       testdb4

 

當節(jié)點1、2主機起來之后,在查看CRS狀態(tài)如下:

$crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATADG.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.LISTENER.lsnr

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.OCRVOTE.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.SYSDG.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.asm

               ONLINE  ONLINE       testdb1                  Started

               ONLINE  ONLINE       testdb2                  Started

               ONLINE  ONLINE       testdb3                  Started

               ONLINE  ONLINE       testdb4                  Started

ora.gsd

               OFFLINE OFFLINE      testdb1

               OFFLINE OFFLINE      testdb2

               OFFLINE OFFLINE      testdb3

               OFFLINE OFFLINE      testdb4

ora.net1.network

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.ons

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.registry.acfs

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       testdb3

ora.cvu

      1        ONLINE  ONLINE       testdb3

ora.oc4j

      1        ONLINE  ONLINE       testdb4

ora.scan1.vip

      1        ONLINE  ONLINE       testdb3

ora.testdb.db

      1        ONLINE  ONLINE       testdb1                  Open

      2        ONLINE  ONLINE       testdb2                  Open

      3        ONLINE  ONLINE       testdb3                  Open

      4        ONLINE  ONLINE       testdb4                  Open

ora.testdb1.vip

      1        ONLINE  ONLINE       testdb1

ora.testdb2.vip

      1        ONLINE  ONLINE       testdb2

ora.testdb3.vip

      1        ONLINE  ONLINE       testdb3

ora.testdb4.vip

      1        ONLINE  ONLINE       testdb4

 

測試結(jié)果

當宕掉1個或多個節(jié)點時,其VIP會飄至正常節(jié)點,所有客戶端重連接到可用節(jié)點,當測試主機重啟完成之后,CRS會自動拉起,且VIP會正常回飄。

 

4.3 模擬public網(wǎng)絡(luò)中斷

由于主機做了虛擬化,無法拔除網(wǎng)線。使用命令ifconfig en1 down宕掉節(jié)點1 public ip所在的網(wǎng)卡進行測試

1)查看節(jié)點1發(fā)現(xiàn)公有IPVIPSCAN IP均在網(wǎng)卡en1上。

root@testdb1:/#netstat -in

Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll

en1   1500  link#2      0.14.5e.79.5c.ca  5153732     0  4066346     2     0

en1   1500  100.15.64   100.15.64.180     5153732     0  4066346     2     0

en1   1500  100.15.64   100.15.64.184     5153732     0  4066346     2     0

en1   1500  100.15.64   100.15.64.188     5153732     0  4066346     2     0

en2   1500  link#3      0.14.5e.79.5b.e6 40305463     0 44224443     2     0

en2   1500  7.154.64    7.154.64.1       40305463     0 44224443     2     0

en2   1500  169.254     169.254.78.30    40305463     0 44224443     2     0

lo0   16896 link#1                        2316784     0  2316787     0     0

lo0   16896 127         127.0.0.1         2316784     0  2316787     0     0

lo0   16896 ::1%1                         2316784     0  2316787     0     0

2)使用命令ifconfig en1 down進行測試

root@testdb1:/oracle/app/11.2.0/grid/bin#ifconfig en1 down

3)查看crs資源狀態(tài)發(fā)現(xiàn)vipscan ip均已飄至正常節(jié)點

testdb3:/home/oracle(testdb3)$crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATADG.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.LISTENER.lsnr

               ONLINE  OFFLINE      testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.OCRVOTE.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.SYSDG.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.asm

               ONLINE  ONLINE       testdb1                  Started

               ONLINE  ONLINE       testdb2                  Started

               ONLINE  ONLINE       testdb3                  Started

               ONLINE  ONLINE       testdb4                  Started

ora.gsd

               OFFLINE OFFLINE      testdb1

               OFFLINE OFFLINE      testdb2

               OFFLINE OFFLINE      testdb3

               OFFLINE OFFLINE      testdb4

ora.net1.network

               ONLINE  OFFLINE      testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.ons

               ONLINE  OFFLINE      testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.registry.acfs

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       testdb2

ora.cvu

      1        ONLINE  ONLINE       testdb2

ora.oc4j

      1        ONLINE  ONLINE       testdb4

ora.scan1.vip

      1        ONLINE  ONLINE       testdb2

ora.testdb.db

      1        ONLINE  ONLINE       testdb1                  Open

      2        ONLINE  ONLINE       testdb2                  Open

      3        ONLINE  ONLINE       testdb3                  Open

      4        ONLINE  ONLINE       testdb4                  Open

ora.testdb1.vip

      1        ONLINE  INTERMEDIATE testdb4                  FAILED OVER

ora.testdb2.vip

      1        ONLINE  ONLINE       testdb2

ora.testdb3.vip

      1        ONLINE  ONLINE       testdb3

ora.testdb4.vip

      1        ONLINE  ONLINE       testdb4

 

4)將節(jié)點1en1網(wǎng)卡啟起來

root@testdb1:/#ifconfig en1 up

 

5)查看crs資源狀態(tài)發(fā)現(xiàn)vip正?;仫h

testdb3:/home/oracle(testdb3)$crsctl stat res -t

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATADG.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.LISTENER.lsnr

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.OCRVOTE.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.SYSDG.dg

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.asm

               ONLINE  ONLINE       testdb1                  Started

               ONLINE  ONLINE       testdb2                  Started

               ONLINE  ONLINE       testdb3                  Started

               ONLINE  ONLINE       testdb4                  Started

ora.gsd

               OFFLINE OFFLINE      testdb1

               OFFLINE OFFLINE      testdb2

               OFFLINE OFFLINE      testdb3

               OFFLINE OFFLINE      testdb4

ora.net1.network

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.ons

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

ora.registry.acfs

               ONLINE  ONLINE       testdb1

               ONLINE  ONLINE       testdb2

               ONLINE  ONLINE       testdb3

               ONLINE  ONLINE       testdb4

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

      1        ONLINE  ONLINE       testdb2

ora.cvu

      1        ONLINE  ONLINE       testdb2

ora.oc4j

      1        ONLINE  ONLINE       testdb4

ora.scan1.vip

      1        ONLINE  ONLINE       testdb2

ora.testdb.db

      1        ONLINE  ONLINE       testdb1                  Open

      2        ONLINE  ONLINE       testdb2                  Open

      3        ONLINE  ONLINE       testdb3                  Open

      4        ONLINE  ONLINE       testdb4                  Open

ora.testdb1.vip

      1        ONLINE  ONLINE       testdb1

ora.testdb2.vip

      1        ONLINE  ONLINE       testdb2

ora.testdb3.vip

      1        ONLINE  ONLINE       testdb3

ora.testdb4.vip

      1        ONLINE  ONLINE       testdb4

 

測試結(jié)果

測試節(jié)點(節(jié)點1)監(jiān)聽停止,SCAN LISTENER原來在該節(jié)點運行,已漂移到其他可用節(jié)點,測試節(jié)點 VIP漂移到其他可用節(jié)點,當網(wǎng)卡起來之后(public網(wǎng)絡(luò)恢復(fù)正常),VIP正?;仫h,測試節(jié)點監(jiān)聽自動onlineSCAN LISTENERscan VIP沒回飄。而后我們依次測試宕掉其他節(jié)點的public IP所在網(wǎng)卡,發(fā)現(xiàn)SCAN LISTENER漂移至instance_number最小的節(jié)點,而vip隨機漂移。

 

4.4 宕掉監(jiān)聽測試

通過kill監(jiān)聽進程實現(xiàn)

測試結(jié)果

原有連接沒有收到影響,新的連接不能連到該節(jié)點實例,應(yīng)用通過TAF或自動重連到另一節(jié)點

監(jiān)聽進程自動重新啟動

 

4.5 數(shù)據(jù)庫單個實例crash測試

通過kill pmon進程實現(xiàn)

測試結(jié)果

kill pmon進程后,數(shù)據(jù)庫實例crash,并且實例自動重啟,重啟完成后會話自動重新連接

 

4.6 模擬CSSD進程crash

通過kill cssd進程實現(xiàn)

測試結(jié)果

kill cssd進程后,該節(jié)點重啟,VIP飄至其他正常節(jié)點,主機啟動完成后CRS自動拉起,集群重新配置。

 

4.7 模擬CRSD進程crash

通過kill crsd進程實現(xiàn)

測試結(jié)果

kill crsd.bin進程后,一分鐘內(nèi)該進程自動拉起。原理:crsd進程crash將會被orarootagent檢測到,同時crsd進程會被自動重啟。

 

4.8 模擬EVMD進程crash

通過kill evmd進程實現(xiàn)

測試結(jié)果

kill evmd.bin進程后,一分鐘內(nèi)該進程自動拉起。原理:evmd進程crash將被ohasd進程檢測到,evmd、orarootagentcrsd進程將會被重啟


向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI