Oracle, Technical

ASM Negative Free Space

In the last post I showed mathematically how ASM calculates the free usable space that it displays. However one of the first questions I received after presenting that internally was from someone concerned about all of the unusable space being saved just in case we lose a disk. (In my worked example it was 1/6 of the disk capacity! And what if we don’t care about restoring redundancy before we replace the failed disk?)

But it turns out that ASM actually handles this quite nicely – the “usable space” is used only for display and alerting. If a datafile needs to autoextend or if an archivelog needs to be created then ASM will keep using space until it completely exhausts everything physically available. It will go ahead and use the “reserved space” and just report a negative amount of free space! Here’s the output of my test confirming this behavior:

SQL> alter database datafile 
2>  '+TEST01/js1_rh5lab20/datafile/filler.256.681667743' resize 18G;

Database altered.


rh5lab20$ asmcmd dgs
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB
MOUNTED  NORMAL  N         512   4096  1048576     38561     1529

  Req_mir_free_MB  Usable_file_MB  Offline_disks  Name
             7844           -3157              0  TEST01/


rh5lab20$ asmdf
Filesystem        SizeKB     UsedKB    AvailKB    Use% Mounted on
+TEST01         15727104   18959872   -3232768 120.56% TEST01

There is also a second way to get negative usable space in ASM. If you do experience a failure, then ASM will restore your redundancy level making new copies of the data that was on the failed disk(s). It will use the “reserved space” on your disks. After the rebuild is complete, ASM will recalculate the amount of reserved space it needs to protect from a second failure. If you were using most of the space before the first failure then ASM might report a negative amount of usable space after the rebuild.

It’s important for you to remember that negative free space doesn’t mean your data isn’t safe – you just won’t be able to restore redundancy after the failure. In other words, if you have negative free space then you cannot physically survive two subsequent failures without data loss (or three with high redundancy/triple mirroring). But ASM allows the negative numbers because it’s smart enough not to hang your database when it can be avoided (for example if archivelogs fill up the reported usable space).


About Jeremy

Doing stuff with Oracle Database, Performance, Clusters, Linux. about.me/jeremy_schneider


3 thoughts on “ASM Negative Free Space

  1. Hi Jeremy,

    I would be curious to know where you got asmdf.

    PS. Thanks for your amazing articles, it rocks !!


    Posted by -phil- | April 17, 2009, 7:13 am
  2. Three cheers for replying to comments one year after the fact… :)

    The asmdf command was part of a perl-based toolkit available at the firm. Quite a useful command – very helpful with the transition to ASM. There were a lot of scripts that ran commands on the datafile filesystems, so we created a similar interface for ASM volumes that the scripts could use.

    FWIW, I think their asmdf command was very similar to this one from Yossi Nixon.

    Posted by Jeremy | July 15, 2010, 12:51 pm


  1. Pingback: ASM Mirroring – No Hot Spare Disk : Ardent Performance Computing - July 15, 2010


This is my personal website. The views expressed here are mine alone and may not reflect the views of my employer.

contact: 312-725-9249 or schneider @ ardentperf.com




%d bloggers like this: