In this article, we will discuss today how to check free space in ASM Disk Group. Let’s go through the steps :
Table of Contents
Step 1: Check Free Space in ASM Disk Group :
Issue the below command to get the free space and used space details in ASM diskgroup:
set colsep |
select NAME,TOTAL_MB/1024 SIZE_GB ,FREE_MB/1024 FREE_GB, (TOTAL_MB -FREE_MB)/1024 AS USED_SPACE_GB,((TOTAL_MB -FREE_MB)/TOTAL_MB)*100 PERCENT_USED from v$asm_diskgroup order by 1;
Output :
NAME | SIZE_GB| FREE_GB|USED_SPACE_GB|PERCENT_USED
----------|----------|----------|-------------|------------
DATA |8876.54297|1795.76953| 7080.77344 | 79.7694943
Step 2: Check which files are occupying space :
Now, issue the below command to check which files are taking most of the space :
set lines 300 set pagesize 300 set linesize 400 column type format A30 select x.NAME,y.type,sum(b.bytes)/1024/1024/1024 from v$asm_file y,v$asm_diskgroup x where x.GROUP_NUMBER=y.GROUP_NUMBER group by x.NAME,y.type order by x.NAME,y.type;
Output :
NAME |TYPE |SUM(B.BYTES)/1024/1024/1024
----------|----------------|-------------
DATA |ARCHIVELOG | 795.668423
DATA |AUTOBACKUP | .474304199
DATA |CONTROLFILE | .474090576
DATA |DATAFILE | 5447.15802
DATA |DATAGUARDCONFIG | .000030518
DATA |FLASHBACK | 612.309471
DATA |ONLINELOG | 30.2735558
DATA |TEMPFILE | 188.007874
So, you can check and take action accordingly on the files which are taking most of the space.
Also, you can get more information from the Oracle Doc ID 1553744.1.
Reference ASM Related Articles :
- Create ASM diskgroup on Linux: Easy Step-by-step guide
- How to create ASM disk on Linux: Easy Step-by-step guide