一次ASM磁盘空间假装耗尽 ORA-15041: DISKGROUP SPACE EXHAUSTED
给ASM磁盘新增一块盘进去,ASM_DISK2剩余空间四百多G:
SQL> select * from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB
------------ ------------------------------------------------------------ ----------- ---------- -------------------- ---------------------- ------------ ---------- ---------- -----------------------
USABLE_FILE_MB OFFLINE_DISKS UN COMPATIBILITY
-------------- ------------- -- ------------------------------------------------------------------------------------------------------------------------
DATABASE_COMPATIBILITY
------------------------------------------------------------------------------------------------------------------------
1 ASM_DISK1 512 4096 1048576 MOUNTED NORMAL 408613 44641 0
22320 0 N 10.1.0.0.0
10.1.0.0.0
2 ASM_DISK2 512 4096 1048576 MOUNTED EXTERN 2890752 421045 0
421045 0 N 10.1.0.0.0
10.1.0.0.0
SQL>
但是发现在建表空间的时候提示空间不够:
create tablespace HIS_DATA
*
ERROR at line 1:
ORA-01119: error in creating database file
'+ASM_DISK2/orcl/datafile/hisdata017.dbf'
ORA-17502: ksfdcre:4 Failed to create file
+ASM_DISK2/orcl/datafile/hisdata017.dbf
ORA-15041: diskgroup space exhausted
这种是典型的ASM磁盘空间假耗尽
检查该ASM卷组中每个盘的大小:
SQL> select path,total_mb,free_mb from v$asm_disk_stat;
PATH TOTAL_MB FREE_MB
-------------------------------------------------- ---------- ----------
/dev/raw/raw5 196 0
/dev/raw/raw4 196 0
/dev/raw/raw3 196 0
/dev/raw/raw2 196 0
/dev/raw/raw1 196 0
ORCL:VOL1 203322 21336
ORCL:VOL2 205291 23305
ORCL:VOL3 1228800 555
ORCL:VOL4 1228800 553
ORCL:VOL5 433152 419937
10 rows selected.
其中3,4,5属于ASM_DISK2 ,可以发现 3 ,4 的空间不够,所以新建数据文件的时候提示空间不够,ASM默认会自动对每个卷组中的盘进行reblance ,使数据平均分布
这时候需要检查参数 ASM_POWER_LIMIT
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
asm_power_limit integer
1
SQL>
检查发现该参数为1,继续检查ASM后台是否在做reblance的操作:
SQL> select * from v$asm_operation;
no rows selected
SQL>
发现并没有在进行reblance,所以导致该ASM卷组空间假装耗尽,调整power值:
SQL> alter diskgroup ASM_DISK2 rebalance power 5;
Diskgroup altered.
SQL>
调整之后检查发现,还是没有反映:
SQL> select * from v$asm_operation;
no rows selected
SQL>
继续调整,使用最大值进行:
alter diskgroup ASM_DISK2 rebalance power 11 wait;
此时发现ASM已经在进程reblance操作:
SQL> select * from v$asm_operation;
GROUP_NUMBER OPERATION STATE POWER ACTUAL SOFAR EST_WORK
------------ ---------- -------- ---------- ---------- ---------- ----------
EST_RATE EST_MINUTES
---------- -----------
2 REBAL RUN 11 11 20350 350483
2677 123
SQL>
再检查每个盘的空间情况,可以发现已经在进程reblance操作:
SQL> select path,total_mb,free_mb from v$asm_disk_stat;
PATH TOTAL_MB FREE_MB
-------------------------------------------------- ---------- ----------
/dev/raw/raw5 196 0
/dev/raw/raw4 196 0
/dev/raw/raw3 196 0
/dev/raw/raw2 196 0
/dev/raw/raw1 196 0
ORCL:VOL1 203322 21336
ORCL:VOL2 205291 23305
ORCL:VOL3 1228800 13903
ORCL:VOL4 1228800 13905
ORCL:VOL5 433152 393237
10 rows selected.
SQL>
至此,后续的新建数据文件操作一切正常。
asm_power_limit参数详解以及ASM其他参数详解 请查看: