這篇文章主要介紹ASM磁盤組如何刪除DISK操作,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
成都創(chuàng)新互聯(lián)-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比肇東網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式肇東網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋肇東地區(qū)。費(fèi)用合理售后完善,10年實(shí)體公司更值得信賴。
ASM接觸了很長(zhǎng)時(shí)間,從磁盤組中刪除磁盤的操作還是第一次。
沒想到這么簡(jiǎn)單的操作,由于不熟悉還碰到了兩個(gè)小問題。
[oracle@dbserver1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 9 10:08:06 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> set pages 100 lines 120
SQL> select group_number, name, state, type, total_mb, free_mb
2 from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB
------------ ------------------------------ ----------- ------ ----------
----------
1 DATA_AU1M CONNECTED EXTERN 1953124 7430
2 DATA_AU2M CONNECTED EXTERN 1953124 7384
3 DATA_AU4M CONNECTED EXTERN 1953124 7304
4 DATA CONNECTED EXTERN 3906248 3898966
SQL> col path format a30
SQL> col name format a30
SQL> select disk_number, path, name, total_mb, free_mb
2 from v$asm_disk
3 where group_number = 4;
DISK_NUMBER PATH NAME TOTAL_MB FREE_MB
----------- ------------------------- ------------------------- ----------
----------
1 /dev/asm-disk5 DATA_0001 1953124 1949486
0 /dev/asm-disk4 DATA_0000 1953124 1949480
SQL> alter diskgroup data drop disk '/dev/asm-disk5';
alter diskgroup data drop disk '/dev/asm-disk5'
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 -
64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
由于當(dāng)前連接的是數(shù)據(jù)庫(kù),顯然不能對(duì)ASM實(shí)例中的磁盤組進(jìn)行操作,下面連接ASM實(shí)例:
[oracle@dbserver1 ~]$ su - grid
Password:
[grid@dbserver1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 9 10:12:39 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Automatic Storage Management option
SQL> set pages 100 lines 120
SQL> select instance_number, instance_name from v$instance;
INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
1 +ASM
SQL> alter diskgroup data drop
disk '/dev/asm-disk5';
alter diskgroup data drop disk '/dev/asm-disk5'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group
SQL> alter diskgroup data drop disk data_0001;
alter diskgroup data drop disk data_0001
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group
開始看到這個(gè)錯(cuò)誤還確實(shí)疑惑了一下,怎么可能沒有權(quán)限。有在操作系統(tǒng)上檢查了磁盤的權(quán)限,也沒有任何問題。
檢查Oracle文檔的錯(cuò)誤信息后發(fā)現(xiàn),由于習(xí)慣了適用sysdba來處理,忽略了當(dāng)前是11g的ASM,應(yīng)該用sysasm來登錄:
SQL> conn / as sysasm
Connected.
SQL> alter diskgroup data drop disk data_0001;
Diskgroup altered.
SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
----------- -------- ------------------------------ ---------- ----------
1 DROPPING DATA_0001 1953124 1950842
0 NORMAL DATA_0000 1953124 1948124
SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
----------- -------- ------------------------------ ---------- ----------
1 DROPPING DATA_0001 1953124 1951434
0 NORMAL DATA_0000 1953124 1947532
SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
----------- -------- ------------------------------ ---------- ----------
1 DROPPING DATA_0001 1953124 1952556
0 NORMAL DATA_0000 1953124 1946410
SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
----------- -------- ------------------------------ ---------- ----------
1 DROPPING DATA_0001 1953124 1953096
0 NORMAL DATA_0000 1953124 1945870
SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 4;
DISK_NUMBER STATE NAME TOTAL_MB FREE_MB
----------- -------- ------------------------------ ---------- ----------
0 NORMAL DATA_0000 1953124 1945854
SQL> select group_number, disk_number, path, name, state,
total_mb, free_mb
2 from v$asm_disk
3 where path = '/dev/asm-disk5';
GROUP_NUMBER DISK_NUMBER PATH NAME STATE TOTAL_MB FREE_MB
------------ ----------- --------------- ---------- -------- ----------
----------
0 1 /dev/asm-disk5 NORMAL 0 0
可以看到,雖然刪除操作執(zhí)行完成,但是磁盤并沒有真正被刪掉,ASM在后臺(tái)嘗試將磁盤上的數(shù)據(jù)挪到其他可用磁盤中,這時(shí)磁盤的狀態(tài)為DROPPING。
當(dāng)后臺(tái)數(shù)據(jù)同步的操作完成,磁盤的組信息被清除,磁盤恢復(fù)STATE狀態(tài)。這時(shí)這個(gè)磁盤就從ASM中被徹底刪除。
以上是“ASM磁盤組如何刪除DISK操作”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
本文標(biāo)題:ASM磁盤組如何刪除DISK操作
地址分享:http://www.rwnh.cn/article12/jiecdc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導(dǎo)航、網(wǎng)站收錄、網(wǎng)站建設(shè)、移動(dòng)網(wǎng)站建設(shè)、微信公眾號(hào)、商城網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)