ASM磁碟組刪除DISK操作
ASM接觸了很長時間,從磁碟組中刪除磁碟的操作還是第一次。
沒想到這麼簡單的操作,由於不熟悉還碰到了兩個小問題。
[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
由於當前連線的是資料庫,顯然不能對ASM例項中的磁碟組進行操作,下面連線ASM例項:
[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
開始看到這個錯誤還確實疑惑了一下,怎麼可能沒有許可權。有在作業系統上檢查了磁碟的許可權,也沒有任何問題。
檢查Oracle文件的錯誤資訊後發現,由於習慣了適用sysdba來處理,忽略了當前是11g的ASM,應該用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
可以看到,雖然刪除操作執行完成,但是磁碟並沒有真正被刪掉,ASM在後臺嘗試將磁碟上的資料挪到其他可用磁碟中,這時磁碟的狀態為DROPPING。
當後臺資料同步的操作完成,磁碟的組資訊被清除,磁碟恢復STATE狀態。這時這個磁碟就從ASM中被徹底刪除。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2132577/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在ASM磁碟組中刪除一個磁碟ASM
- asm 磁碟組 增刪磁碟組ASM
- ASM的管理----刪除和新增磁碟組ASM
- 11.2刪除第一個ASM磁碟組ASM
- ASM磁碟組修改重建操作ASM
- 規劃ASM DISK GROUP、檢視asm 磁碟當前狀態、mount or dismount 磁碟組ASM
- 遷移OCR和VotingDisk並刪除原ASM磁碟組ASM
- 對ASM dgdata 磁碟組增加disk實施步驟ASM
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- Oracle ASM磁碟組常用操作命令OracleASM
- 【ASM學習】手工刪除ASM磁碟組時提示錯誤ORA-15039ASM
- ASM磁碟組更換磁碟的操作方法ASM
- ASM磁碟組擴容操作文件ASM
- ASM磁碟簡單維護,新增,刪除ASM
- 在ASM磁碟組中刪除歸檔日誌報ORA-15028ASM
- ASM磁碟組限制ASM
- asm新增刪除磁碟ASM
- 遷移ASM磁碟組ASM
- asm新增和刪除磁碟ASM
- ORACLE RAC重建ASM磁碟組OracleASM
- ASM磁碟組空間不足ASM
- drop asm disk、撤銷drop asm diskASM
- 刪除ASM例項ASM
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- 手工建立ASM Disk Groups、為 ASM Disk Groups 新增 diskASM
- 修改ASM磁碟組的屬性ASM
- 修改ASM磁碟組冗餘模式ASM模式
- 有效管理 ASM 磁碟組空間ASM
- Oracle ASM新增磁碟組POWER OPTIONOracleASM
- Oracle ASM異常dismount磁碟組OracleASM
- 不能為 EXTERNAL REDUNDANCY的磁碟組新增failgroup diskAI
- asm磁碟組建立錯誤,用中轉儲存,重建磁碟組ASM
- Asm disk managerASM
- 新增磁碟多連路磁碟併為ASM磁碟組擴容ASM
- Dynamic disk動態磁碟的操作和總結
- asm例項刪除方法ASM
- 使用udev擴充套件ASM磁碟組dev套件ASM
- ASM 磁碟組的建立及擴容ASM