20140218_RAC ASM新增磁碟測試

gdutllf2006發表於2014-02-18

環境:Vmware+Redhat6.1 + Oracle11.2.0.3 + 3節點RAC + ASM


測試asm新增磁碟四種情況
第一種:節點3新增磁碟組後在節點1是否可以直接認出
--認不到,說明分配共享儲存後節點的OS必須重啟

第二種:節點3新增磁碟組後,節點1重啟,認出共享盤但沒繫結裸裝置,是否能認出新的磁碟組
--認不到,說明OS重啟,Raw繫結都是必須在所有節點上做的

第三種:節點3新增磁碟組後,節點1重啟,認出共享盤,繫結裸裝置,是否能認出新的磁碟組
--認不到,說明OS重啟,Raw繫結,mount磁碟組都是必須在所有節點上做的

第四種:節點3新增磁碟組後,節點1提前繫結裸裝置資訊,重啟伺服器後能否直接認出新的磁碟組
--認不到,說明OS重啟,Raw繫結,mount磁碟組都是必須在所有節點上做的,如果在OS重啟前就提前繫結RAW,
那麼Mount的動作是可以省略的,但最好確認下


一.節點3新增磁碟組後在節點1是否可以直接認出
1.新增共享盤
vmkfstools -c 1G -d   eagerzeroedthick /vmfs/volumes/DS01/diskarrayls/vocr5.vmdk -a lsilogic

繫結裸裝置
vi /etc/rc.local 
/bin/raw /dev/raw/raw7  /dev/disk/by-id/scsi-36000c296397ade932d26e09836be18ad

2.3節點建立磁碟組
SQL> create diskgroup TEST_DATA external redundancy disk '/dev/raw/raw7';
Diskgroup created.
3.在節點三上檢視磁碟的路徑,可以看到新加入的磁碟組
col PATH for a40
select NAME,PATH from v$asm_disk;      
NAME                           PATH
------------------------------ ----------------------------------------
CRS_0003                       /dev/raw/raw6
CRS_0002                       /dev/raw/raw5
CRS_0001                       /dev/raw/raw4
DATA_0000                      /dev/raw/raw3
CRS_0000                       /dev/raw/raw2
FRA_0000                       /dev/raw/raw1
TEST_DATA_0000                 /dev/raw/raw7

[grid@add_node_test ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/
TEST_DATA/

7 rows selected.

4.在第一節點上檢視,沒有發現新的磁碟組和磁碟
SQL> select NAME,PATH from v$asm_disk;

NAME                           PATH
------------------------------ ----------------------------------------
CRS_0003                       /dev/raw/raw6
CRS_0002                       /dev/raw/raw5
CRS_0001                       /dev/raw/raw4
DATA_0000                      /dev/raw/raw3
CRS_0000                       /dev/raw/raw2
FRA_0000                       /dev/raw/raw1

[grid@esxi1v01 ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/

節點3上檢查asm相關日誌發現有相關報錯的資訊
磁碟組建立成功,但資訊無法再rac裡面跟新,因為其餘rac節點沒有新增到新的共享盤
@linlf ???這是什麼意思?
NOTE: diskgroup resource ora.TEST_DATA.dg is online
SUCCESS: create diskgroup TEST_DATA external redundancy disk '/dev/raw/raw7'
ERROR: failed to update diskgroup resource ora.TEST_DATA.dg

5.新加表空間測試
節點3:新增成功,新加入磁碟組可以使用
SQL>create tablespace asm_test3 datafile'+TEST_DATA/asm_test3.dbf' size 10m;
Tablespace created.
節點3告警日誌
Tue Feb 18 14:21:48 2014
create tablespace asm_test datafile'+TEST_DATA/asm_test.dbf' size 10m
SUCCESS: diskgroup TEST_DATA was mounted

節點1:找不到路徑
SQL>create tablespace asm_test2 datafile'+TEST_DATA/asm_test2.dbf' size 10m;
create tablespace asm_test2 datafile'+TEST_DATA/asm_test2.dbf' size 10m
*
ERROR at line 1:
ORA-01119: error in creating database file '+TEST_DATA/asm_test2.dbf'
ORA-17502: ksfdcre:4 Failed to create file +TEST_DATA/asm_test2.dbf
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
節點1告警日誌
Tue Feb 18 14:21:39 2014
ORA-17503: ksfdopn:2 Failed to open file +TEST_DATA/asm_test.dbf
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
Errors in file /oracle/app/oracle/diag/rdbms/test/test1/trace/test1_dbw0_9770.trc:
ORA-01186: file 22 failed verification tests

二.節點3新增磁碟組後,節點1重啟,認出共享盤但沒繫結裸裝置,是否能認出新的磁碟組
重啟節點1伺服器後新加入磁碟組出現 但沒有繫結裸裝置
此時檢視下asm依然是無法識別
[grid@esxi1v01 ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/

 


三.節點3新增磁碟組後,節點1重啟,認出共享盤,繫結裸裝置,是否能認出新的磁碟組
在叢集啟動的情況下繫結好裸裝置檢視,新的磁碟組任然未顯示出來
@linlf --需要mount

[root@esxi1v01 raw]# ls
raw1  raw2  raw3  raw4  raw5  raw6  raw7  rawctl
[grid@esxi1v01 ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/

檢視磁碟情況已經認出了新增磁碟
col PATH for a40
select name,state,path from v$asm_disk;
SQL> select name,state,path from v$asm_disk;

NAME                           STATE    PATH
------------------------------ -------- ----------------------------------------
                               NORMAL   /dev/raw/raw7
CRS_0003                       NORMAL   /dev/raw/raw6
CRS_0002                       NORMAL   /dev/raw/raw5
CRS_0001                       NORMAL   /dev/raw/raw4
DATA_0000                      NORMAL   /dev/raw/raw3
CRS_0000                       NORMAL   /dev/raw/raw2
FRA_0000                       NORMAL   /dev/raw/raw1

檢視磁碟組情況 還是沒有mount的狀態
SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
CRS                            EXTERN MOUNTED
DATA                           EXTERN MOUNTED
FRA                            EXTERN MOUNTED
TEST_DATA                             DISMOUNTED


手動mount磁碟組
SQL> alter diskgroup TEST_DATA  mount;

Diskgroup altered.

檢視狀態OK
SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
CRS                            EXTERN MOUNTED
DATA                           EXTERN MOUNTED
FRA                            EXTERN MOUNTED
TEST_DATA                      EXTERN MOUNTED

測試在新磁碟組上新增表空間 成功
SQL>create tablespace asm_test2 datafile'+TEST_DATA/asm_test2.dbf' size 10m;

Tablespace created.

四.節點3新增磁碟組後,節點1提前繫結裸裝置資訊,重啟伺服器後能否直接認出新的磁碟組
系統重啟先 新增以下資訊
vi /etc/rc.local 
/bin/raw /dev/raw/raw7  /dev/disk/by-id/scsi-36000c296397ade932d26e09836be18ad

重啟後檢視新增磁碟狀態

SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
CRS                            EXTERN MOUNTED
DATA                           EXTERN MOUNTED
FRA                            EXTERN MOUNTED
TEST_DATA                      EXTERN MOUNTED

測試新增磁碟組是否可用
SQL> create tablespace asm_test3 datafile'+TEST_DATA/asm_test3.dbf' size 10m;

Tablespace created.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-1083339/,如需轉載,請註明出處,否則將追究法律責任。

相關文章