Will the Disk Group Survive a Storage Server Failure? Reading ASM Capacity Correctly on Exadata in Oracle Database@Azure
Disk group space is one of those numbers that everyone thinks they understand. The monitoring dashboard shows FREE_MB, the disk group looks a third empty, and nobody worries. Then a storage server fails, ASM starts to rebuild the lost mirror copies on the remaining servers, and the rebuild stops because there is not enough room. From that moment, a second failure would lose data.
On Exadata, every disk group is mirrored across storage servers, and part of the free space must stay free so that ASM can restore redundancy after a failure. This post reads the capacity of the disk groups on Exadata Database Service in Oracle Database@Azure the way ASM itself sees it, finds where the space goes, and sets up a check that warns before the safety margin is gone.
The Use Case
The Exadata VM cluster in Oracle Database@Azure runs four databases. The monthly report says the DATA disk group is 31 percent free. The infrastructure team plans to add two more databases next quarter and asks whether the current storage is enough. The DBA wants a reliable answer, not the number on the dashboard.
Environment used in this runbook
Service: Exadata Database Service on Dedicated Infrastructure in Oracle Database@Azure
Storage: three storage servers, disk groups DATAC1 and RECOC1, high redundancy
Software: Oracle Grid Infrastructure 19c and Oracle Database 19c (19.24)
Databases: SALES_AZ, CRM_AZ, HR_AZ and DWH_AZ on one VM cluster
Licence: ASM is part of Grid Infrastructure and needs no extra-cost option
How ASM Counts Space
TOTAL_MB and FREE_MB are raw. They count every megabyte on every disk, before mirroring, so a high redundancy disk group stores each extent three times.
REQUIRED_MIRROR_FREE_MB is the reserve. It is the raw space ASM needs to restore full redundancy after the loss of its largest failure group, which on Exadata is one storage server.
USABLE_FILE_MB is the real answer. It is the free space after subtracting the reserve and dividing by the number of copies: how much new data can be stored while still surviving a failure.
A negative USABLE_FILE_MB is a warning. The disk group still works, but after a storage server failure ASM could not restore full redundancy.
Step 1: List the Disk Groups
Start with the overview from asmcmd on one of the database servers, as the grid user. It shows the raw space, the reserve and the usable space side by side.
Shell |
# On a database server of the VM cluster, as the grid user asmcmd lsdg |
Expected output |
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED HIGH N 512 512 4096 4194304 60211200 18698240 10035200 2887680 0 Y DATAC1/
MOUNTED HIGH N 512 512 4096 4194304 15052800 9123840 2508800 2205013 0 N RECOC1/What to expect: One line per disk group, with high redundancy, 4 MB allocation units, and the space columns Total_MB, Free_MB, Req_mir_free_MB and Usable_file_MB. DATAC1 has 18.7 TB raw free, which is the 31 percent on the dashboard, but only about 2.9 TB of usable file space. The next steps show the same numbers with column names and explain the gap.
Step 2: Read the Same Numbers in the ASM Instance
Query V$ASM_DISKGROUP in the ASM instance. The columns have names, and the query adds the free percentage as most dashboards show it, next to the usable space in gigabytes.
SQL |
-- sqlplus / as sysasm on a database server COLUMN name FORMAT A8 COLUMN type FORMAT A6
SELECT name, type, ROUND(total_mb/1024) AS total_gb, ROUND(free_mb/1024) AS free_gb, ROUND(100 * free_mb / total_mb) AS free_pct, ROUND(required_mirror_free_mb/1024) AS reserve_gb, ROUND(usable_file_mb/1024) AS usable_gb FROM v$asm_diskgroup ORDER BY name; |
Expected output |
NAME TYPE TOTAL_GB FREE_GB FREE_PCT RESERVE_GB USABLE_GB
-------- ------ ---------- ---------- ---------- ---------- ----------
DATAC1 HIGH 58800 18260 31 9800 2820
RECOC1 HIGH 14700 8910 61 2450 2153What this does: It shows why 31 percent free means far less than it seems. Of the 18,260 GB raw free in DATAC1, 9,800 GB are the reserve for one storage server failure. The remaining 8,460 GB are divided by three, because high redundancy keeps three copies, which leaves 2,820 GB of new data that can be stored safely.
Tip: Put USABLE_FILE_MB, not FREE_MB, on the capacity dashboard. It is the only number that already accounts for both mirroring and the failure reserve, and it can be compared directly with the size of the databases.
Step 3: Find Which Database Uses the Space
With several databases in one disk group, find out how much each one uses. asmcmd du shows the space per directory, both as data and including mirror copies.
Shell |
# As the grid user: space per database directory in DATAC1 for db in SALES_AZ CRM_AZ HR_AZ DWH_AZ; do printf '%-10s ' "$db" asmcmd du --suppressheader +DATAC1/$db done |
Expected output |
SALES_AZ 5242880 15728640
CRM_AZ 1843200 5529600
HR_AZ 307200 921600
DWH_AZ 5734400 17203200What to expect: For each database, the used space in MB and the space including mirrors, three times as much in a high redundancy disk group. The data warehouse and the sales database use more than 80 percent of the disk group between them. That is where growth and clean-up matter most.
Step 4: Measure the Growth
The usable space only means something next to the growth rate. Read the tablespace growth of the largest database from AWR, which keeps a daily record of the space used by each tablespace.
SQL |
-- Connected to DWH_AZ (CDB root) as a DBA: used space per week, last six weeks COLUMN week FORMAT A10
SELECT TO_CHAR(TRUNC(snap_time, 'IW'), 'YYYY-MM-DD') AS week, ROUND(MAX(used_blocks) * 8192 / 1024 / 1024 / 1024) AS used_gb FROM (SELECT snap_id, MIN(TO_DATE(rtime, 'MM/DD/YYYY HH24:MI:SS')) AS snap_time, SUM(tablespace_usedsize) AS used_blocks FROM dba_hist_tbspc_space_usage GROUP BY snap_id) WHERE snap_time >= DATE '2026-10-12' GROUP BY TRUNC(snap_time, 'IW') ORDER BY week; |
Expected output |
WEEK USED_GB
---------- ----------
2026-10-12 5112
2026-10-19 5168
2026-10-26 5221
2026-11-02 5279
2026-11-09 5334
2026-11-16 5390
2026-11-23 5447What to expect: The data warehouse grows by about 56 GB a week. Together with the other databases, measured the same way, the disk group grows by roughly 90 GB of data a week, so the 2,820 GB of usable space lasts about 30 weeks without new databases. The two databases planned for next quarter, at about 1 TB each, would use most of it at once. The query assumes an 8 KB block size; use the block size of your tablespaces if it differs.
Step 5: Find Space That Can Be Reclaimed
Before asking for more storage, look for space that is used but not needed. The recycle bin is a common place for it: dropped tables stay there, with their space, until purged or until the tablespace needs the space.
SQL |
-- In each PDB of the largest databases COLUMN owner FORMAT A12
SELECT owner, COUNT(*) AS objects, ROUND(SUM(space) * 8192 / 1024 / 1024 / 1024) AS gb FROM dba_recyclebin GROUP BY owner ORDER BY gb DESC FETCH FIRST 3 ROWS ONLY; |
Expected output |
OWNER OBJECTS GB
------------ ---------- ----------
DWH_STAGE 412 318
SALES 27 41
ETL_WORK 96 12What to expect: 318 GB of dropped staging tables in the data warehouse, left behind by nightly loads that drop and recreate them. Agree with the owners, then purge with PURGE DBA_RECYCLEBIN in that PDB, or better, change the load jobs to drop with PURGE. This frees space in the tablespace at once; the datafiles keep their size, so the space shows up as free inside the database rather than in the disk group until you resize the datafiles.
Step 6: Watch a Rebalance
Whenever disks are added, dropped or come back after a failure, ASM rebalances. Check its progress and its estimate, both after a planned change and during a real failure.
SQL |
-- sqlplus / as sysasm COLUMN operation FORMAT A9 COLUMN pass FORMAT A9
SELECT group_number, operation, pass, state, power, sofar, est_work, est_minutes FROM gv$asm_operation ORDER BY group_number; |
Expected output |
GROUP_NUMBER OPERATION PASS STAT POWER SOFAR EST_WORK EST_MINUTES
------------ --------- --------- ---- ---------- ---------- ---------- -----------
1 REBAL REBALANCE RUN 4 1872046 5214930 41What to expect: A running rebalance of DATAC1 in the REBALANCE pass, about a third done, with an estimate of 41 minutes left. No rows means no rebalance is running. During a real storage server failure, this is the operation that restores redundancy, and it only completes if the reserve from Step 2 was really free.
Step 7: Add a Daily Capacity Check
Turn the numbers into an alert. A small script on one database server checks the usable space of each disk group against a threshold, and is easy to hook into the monitoring the team already uses.
Shell |
#!/bin/bash # /home/grid/bin/asm_capacity_check.sh, run daily from cron as the grid user THRESHOLD_GB=3000 . /home/grid/.bash_profile
sqlplus -s / as sysasm <<'EOF' | while read dg usable; do SET HEADING OFF FEEDBACK OFF PAGESIZE 0 SELECT name || ' ' || ROUND(usable_file_mb/1024) FROM v$asm_diskgroup; EOF if [ "$usable" -lt "$THRESHOLD_GB" ]; then echo "WARNING: disk group $dg has only ${usable} GB usable file space" else echo "OK: disk group $dg has ${usable} GB usable file space" fi done |
Expected output |
WARNING: disk group DATAC1 has only 2820 GB usable file space
WARNING: disk group RECOC1 has only 2153 GB usable file spaceWhat this does: It prints one line per disk group and flags those below 3,000 GB of usable space. Send the output to the team's alerting, for example through the OCI Monitoring agent or an email from cron. Set the threshold from the growth rate in Step 4: a value that leaves at least three months of growth gives enough time to order and add storage.
Step 8: Plan the Next Database
Use the numbers to answer the infrastructure team's question. Compare the usable space with the planned databases and the growth until the next storage expansion could be in place.
SQL |
-- Simple projection: usable space after the planned databases and twelve weeks of growth SELECT 2820 AS usable_gb_now, 2 * 1024 AS planned_new_dbs_gb, 12 * 90 AS growth_12_weeks_gb, 2820 - 2 * 1024 - 12 * 90 AS usable_gb_after FROM dual; |
Expected output |
USABLE_GB_NOW PLANNED_NEW_DBS_GB GROWTH_12_WEEKS_GB USABLE_GB_AFTER
------------- ------------------ ------------------ ---------------
2820 2048 1080 -308What to expect: A negative result: with the two new databases and twelve weeks of growth, DATAC1 would lose its ability to survive a storage server failure. Before the new databases go live, reclaim the recycle bin space from Step 5 and plan a storage expansion of the Exadata infrastructure, which in Oracle Database@Azure means adding storage servers to the infrastructure and then expanding the VM cluster's storage.
Summary
On Exadata, the free space that matters is the space left after the failure reserve and the mirror copies. Read TOTAL_MB, FREE_MB, REQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB together with asmcmd lsdg or V$ASM_DISKGROUP, and put USABLE_FILE_MB on the dashboard. Find the space per database with asmcmd du, measure growth from DBA_HIST_TBSPC_SPACE_USAGE, reclaim what the recycle bin holds, and watch V$ASM_OPERATION during any rebalance. A daily check against a threshold derived from the growth rate turns this into an early warning, and a simple projection answers whether the next database fits before it is created.
Comments