您好,登錄后才能下訂單哦!
1、AIX系統(tǒng)添加兩塊硬盤hdisk17,hdisk18,并進(jìn)行配置。
1)給磁盤分配pvid
外部存儲設(shè)備中的同一塊硬盤在不同節(jié)點上的名稱可能會不同。同一個硬盤在節(jié)點一中的名稱可能是hdisk4,在節(jié)點二中的名稱可能是hdisk5.雖然ASM實例能正確識別這樣的硬盤,但對于管理員來說可能會產(chǎn)生歧義。不管怎樣,這塊硬盤有一個不變的屬性是PVID,無論在節(jié)點一還是節(jié)點二下都是一樣的。通過下面的命令可以產(chǎn)生硬盤的PVID
chdev -l hdisk17 -a pv=yes
chdev -l hdisk18 -a pv=yes
2)修改磁盤權(quán)限
本項目使用ASM,需要指定ASM磁盤中所要包含的磁盤,并保證grid用戶有對這些磁盤的寫權(quán)限
修改磁盤屬組
chown grid:asmadmin /dev/rhdisk17
chown grid:asmadmin /dev/rhdisk18
修改磁盤權(quán)限
chmod 660 /dev/rhdisk17
chmod 660 /dev/rhdisk18
3)檢查磁盤屬性
有些型號的存儲設(shè)別具有reserve_lock或者reserve_policy屬性,這兩個屬性的存在會阻止多個節(jié)點對存儲設(shè)備進(jìn)行并行讀寫,所以在安裝集群軟件之前應(yīng)該對其屬性進(jìn)行修改。
lsattr -E -l hdisk17|grep reserve_
lsattr -E -l hdisk18|grep reserve_
4)設(shè)置磁盤屬性為reserve_lock=no或reserve_policy=no_reserve
chdev -l hdisk17 -a reserve_policy=no_reserve
chdev -l hdisk18 -a reserve_policy=no_reserve
5)清除磁盤pvid
通過PVID可以在不同節(jié)點中對比、確認(rèn)同一塊硬盤,但是在安裝集群軟件之前應(yīng)該在每個節(jié)點上將PVID清除掉,否則在安裝過程中可能會出現(xiàn)錯誤。
chdev -l hdisk17 -a pv=clear
chdev -l hdisk18 -a pv=clear
2、現(xiàn)有磁盤組添加磁盤。
#su - grid
$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Fri May 5 10:44:30 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> select GROUP_NUMBER,NAME,TYPE,TOTAL_MB,FREE_MB from v$asm_diskgroup;
GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB
------------ ------------------------------ ------ ---------- ----------
1 CRS NORMAL 6144 5218
2 DATA EXTERN 6144000 6141937
SQL> select GROUP_NUMBER,DISK_NUMBER,NAME,FAILGROUP,FAILGROUP,PATH,STATE from v$asm_disk;
GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE
------------ ----------- ------------------------------ ------------------------------ --------------------
2 0 DATA_0000 DATA_0000 DATA_0000 /dev/rhdisk10 NORMAL
2 1 DATA_0001 DATA_0001 DATA_0001 /dev/rhdisk11 NORMAL
2 2 DATA_0002 DATA_0002 DATA_0002 /dev/rhdisk12 NORMAL
2 3 DATA_0003 DATA_0003 DATA_0003 /dev/rhdisk13 NORMAL
2 4 DATA_0004 DATA_0004 DATA_0004 /dev/rhdisk14 NORMAL
2 5 DATA_0005 DATA_0005 DATA_0005 /dev/rhdisk15 NORMAL
2 6 DATA_0006 DATA_0006 DATA_0006 /dev/rhdisk16 NORMAL
1 0 CRS_0000 CRS_0000 CRS_0000 /dev/rhdisk2 NORMAL
1 1 CRS_0001 CRS_0001 CRS_0001 /dev/rhdisk3 NORMAL
1 2 CRS_0002 CRS_0002 CRS_0002 /dev/rhdisk4 NORMAL
2 7 DATA_0007 DATA_0007 DATA_0007 /dev/rhdisk5 NORMAL
GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE
------------ ----------- ------------------------------ ------------------------------ --------------------
2 8 DATA_0008 DATA_0008 DATA_0008 /dev/rhdisk6 NORMAL
2 9 DATA_0009 DATA_0009 DATA_0009 /dev/rhdisk7 NORMAL
2 10 DATA_0010 DATA_0010 DATA_0010 /dev/rhdisk8 NORMAL
2 11 DATA_0011 DATA_0011 DATA_0011 /dev/rhdisk9 NORMAL NORMAL
17 rows selected.
SQL> alter diskgroup DATA add disk '/dev/rhdisk17';
Diskgroup altered.
SQL> alter diskgroup DATA add disk '/dev/rhdisk18';
Diskgroup altered.
SQL> select GROUP_NUMBER,NAME,TYPE,TOTAL_MB,FREE_MB from v$asm_diskgroup;
GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB
------------ ------------------------------ ------ ---------- ----------
1 CRS NORMAL 6144 5218
2 DATA EXTERN 7168000 7165915
SQL> select GROUP_NUMBER,DISK_NUMBER,NAME,FAILGROUP,FAILGROUP,PATH,STATE from v$asm_disk;
GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE
------------ ----------- ------------------------------ ------------------------------ --------------------
2 0 DATA_0000 DATA_0000 DATA_0000 /dev/rhdisk10 NORMAL
2 1 DATA_0001 DATA_0001 DATA_0001 /dev/rhdisk11 NORMAL
2 2 DATA_0002 DATA_0002 DATA_0002 /dev/rhdisk12 NORMAL
2 3 DATA_0003 DATA_0003 DATA_0003 /dev/rhdisk13 NORMAL
2 4 DATA_0004 DATA_0004 DATA_0004 /dev/rhdisk14 NORMAL
2 5 DATA_0005 DATA_0005 DATA_0005 /dev/rhdisk15 NORMAL
2 6 DATA_0006 DATA_0006 DATA_0006 /dev/rhdisk16 NORMAL
1 0 CRS_0000 CRS_0000 CRS_0000 /dev/rhdisk2 NORMAL
1 1 CRS_0001 CRS_0001 CRS_0001 /dev/rhdisk3 NORMAL
1 2 CRS_0002 CRS_0002 CRS_0002 /dev/rhdisk4 NORMAL
2 7 DATA_0007 DATA_0007 DATA_0007 /dev/rhdisk5 NORMAL
GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE
------------ ----------- ------------------------------ ------------------------------ --------------------
2 8 DATA_0008 DATA_0008 DATA_0008 /dev/rhdisk6 NORMAL
2 9 DATA_0009 DATA_0009 DATA_0009 /dev/rhdisk7 NORMAL
2 10 DATA_0010 DATA_0010 DATA_0010 /dev/rhdisk8 NORMAL
2 11 DATA_0011 DATA_0011 DATA_0011 /dev/rhdisk9 NORMAL
2 12 DATA_0012 DATA_0012 DATA_0012 /dev/rhdisk17 NORMAL
2 13 DATA_0013 DATA_0013 DATA_0013 /dev/rhdisk18 NORMAL
17 rows selected.
添加完磁盤之后,oracle會自動做重平衡rebalance操作,可以通過視圖查看(數(shù)據(jù)量很大時,可通過師視圖查出信息)。SQL> select * from v$asm_operation;
no nows selected
SQL>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。