Adding ASM disk after ORA-15041: diskgroup space exhausted .

本文详细介绍了如何解决Oracle数据库中在创建数据文件时遇到的错误,包括检查ASM磁盘空间、扩展当前磁盘组以及添加新磁盘。通过使用ASM管理磁盘组和执行相关SQL命令,成功解决了磁盘空间不足的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

We received the following message:

ERROR at line 1:
ORA-01119: error in creating database file '+DATA'
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15041: diskgroup space exhausted


Check the diskspace in ASM:
SQL> select GROUP_NUMBER, NAME,TOTAL_MB, FREE_MB, USABLE_FILE_MB from V$ASM_DISKGROUP;

GROUP_NUMBER NAME TOTAL_MB FREE_MB USABLE_FILE_MB
------------ ------------------------------ ---------- ---------- --------------
1 ARCHIVELOGS 1349 1283 1283
2 DATA 2039 4 4
3 ONLINELOGS 705 581 581

SQL> select substr(name,1,10) name,substr(path,1,20) path, REDUNDANCY, TOTAL_MB, os_mb, free_mb from V$ASM_DISK where GROUP_NUMBER = 2;

NAME PATH REDUNDA TOTAL_MB OS_MB FREE_MB
---------- -------------------- ------- ---------- ---------- ----------
VOL1 ORCL:VOL1 UNKNOWN 2039 2039 4


First try to extend current diskgroup.

SQL> ALTER DISKGROUP data RESIZE DISK VOL1 size 4G;
ALTER DISKGROUP data RESIZE DISK VOL1 size 4G
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15289: ASM disk VOL1 cannot be resized beyond 2039 M

Diskgroup cannot be extended. Only solution is to add a new disk.
After adding the new disk, the new disk device is /dev/sde

List all current disks on Linux:
sfdisk -l

Now create a partition on /dev/sde to span the whole disk.

[root@dbvisit32 /]# fdisk /dev/sde

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@dbvisit32 /]# ls -la /dev/sde*
brw-r----- 1 root disk 8, 64 Jun 7 11:59 /dev/sde
brw-r----- 1 root disk 8, 65 Jun 7 11:59 /dev/sde1


Partition /dev/sde1 is now created.

Now make the disk available to ASM.

[root@dbvisit31 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
[root@dbvisit31 ~]# /etc/init.d/oracleasm createdisk VOL4 /dev/sde1
Marking disk "/dev/sde1" as an ASM disk: [ OK ]
[root@dbvisit31 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
VOL4


Go back to ASM and add the new disk.

SQL> select substr(name,1,10) name,substr(path,1,20) path, REDUNDANCY, TOTAL_MB, os_mb, free_mb from V$ASM_DISK;

NAME PATH REDUNDA TOTAL_MB OS_MB FREE_MB
---------- -------------------- ------- ---------- ---------- ----------
ORCL:VOL4 UNKNOWN 0 2047 0
VOL1 ORCL:VOL1 UNKNOWN 2039 2039 215
VOL2 ORCL:VOL2 UNKNOWN 705 705 606
VOL3 ORCL:VOL3 UNKNOWN 1349 1349 1214

SQL> ALTER DISKGROUP DATA ADD DISK 'ORCL:VOL4';

SQL> select substr(name,1,10) name,substr(path,1,20) path, REDUNDANCY, TOTAL_MB, os_mb, free_mb from V$ASM_DISK where GROUP_NUMBER = 2;

NAME PATH REDUNDA TOTAL_MB OS_MB FREE_MB
---------- -------------------- ------- ---------- ---------- ----------
VOL1 ORCL:VOL1 UNKNOWN 2039 2039 368
VOL4 ORCL:VOL4 UNKNOWN 2047 2047 1892


All done. Disk group DATA now has an extra 2G.
conda env create -f environment.yml Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you. Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you. Channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch Platform: win-64 Collecting package metadata (repodata.json): done Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - cudatoolkit=12.1.0 Current channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page.
最新发布
07-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值