Oracle MVA

Tales from a Jack of all trades

Shrinking thin provisioned ASM disks results in smaller diskgroup

with 6 comments

Just the other day I ran out of space on my laptop. That’s what you get with these “tiny” SSD’s nowadays. Anyway, when looking around where I had most data stored I found that an ASM disk in a VM was taking most of the space. This disk, as all my disks for VM’s, was thin provisioned. Usually I use some zero fill utillity overwrite the free space in a think provisioned disk so VirtualBox can shrink the disk. But this sounded risky to me for ASM, also those utilities need an ext filesystem.

Some googling learned me that I wasn’t the first one with this issue. Oracle actually supports a tool for this called ASRU: ASM Storage Reclamation Utility (ASMSRU must have been to long). So, easy comes easy does. Download the utility, fire it up ( ./ASRU -a sysasm DATA ) wait for some time and *presto* . 30 GB back of my 256 GB SSD. How cool is that!

Until about a week later I run into space issues in ASM in the VM I mentioned before. My ASM disk group was full. That sounded hilarious to me, since it was on a 40GB disk (checked it in VirtualBox and yes: still 40GB). Then I remembered ASRU.

Checking the v$asm_diskgroup showed something interesting:

SQL> SELECT name, total_mb, usable_file_mb FROM v$asm_diskgroup;

--------- --------- ---------------
DATA          10090            1288

So, ASRU actually not only shrunk the disk, it also resided the disk group in ASM. Now how about that? I didn’t read any statement in the README file saying I had to resize my diskgroup after running ASRU….


Diskgroup altered.

SQL> SELECT name, total_mb, usable_file_mb FROM v$asm_diskgroup;

--------- --------- ---------------
DATA          40954           32152

So, if you happen to use ASRU, don’t forget to resize your diskgroup or you will live in interesting times.

Hopes this helps.


Written by Jacco H. Landlust

January 13, 2013 at 3:16 pm

Posted in ASM, RDBMS, VirtualBox, VMWare

6 Responses

Subscribe to comments with RSS.

  1. Dear Jacco,
    This is R*acer,

    It was God who has helped me to find you here. I have exactly same problem, and I’ve been looking for the solutions for almost 2-3 weeks. After surfing through the internet and over 100 forums,I got to know that we can use a tool which is known as ASRU to make storage aware about the deletion of database. And finally I found documents in Oracle website about it. but none of the documents explain how to attach (run, use, take advantage) from this “ASRU”, it was only one example showing the results before using ASRU, and after that. but I couldn’t find anywhere that how to attach it to Oracle, how to make Oracle understand this ASRU tool..
    Then I visited your website, I’ve hopefully read it and gave it a try. But my sqlplus does not recognize these commands.
    I have to mention that, I’m running standalone ASM on SAN storage (block-level), and using raw devices, and Win server 2008 64-bit is the operating system which is chosen for this database server. The Oracle version which I am running is Oracle 11gr2.
    I’ll be thankful if you kindly let me know how am I supposed to “Fire it up?!”

    Best regards.


    October 9, 2013 at 3:14 pm

    • Hi R*acer,

      You can download ASRU currently right here:[url=””][/]. Rename the .html file to .zip and then unzip.

      The .zip file contains the utility (in perl) and a shell script (ASRU) that you need to transform to windows lingo. The script basically says:
      set ORACLE_HOME (to ASM home!), run %ORACLE_HOME%/perl/bin/perl

      You might need the perl includes that in the script, maybe that is not required for Windows.

      Let me know if this helps,



      Jacco H. Landlust

      October 9, 2013 at 4:19 pm

  2. Hi Jacco,

    Thanks for your help. I got to know what you mean, and I understood the concept. But I am not that much into perl and not familier with the syntax. I run the and receive an error saying that there is a problem in line 32.
    do you have any idea about it and can you help me with that?

    Warm regards.


    October 30, 2013 at 11:18 am

  3. Jacco, Thanks for the post . We are in a intreresting situation now. we are not able to size after ASRU run back to the original size of the disk. resize fails and we are not able to add datafiles now.


    July 17, 2014 at 7:25 pm

    • That sounds interesting indeed. Would you like help fixing this?

      Jacco H. Landlust

      July 31, 2014 at 10:45 pm

  4. so, I need to rename the html to zip .what a fuck….

    Simen David

    December 17, 2018 at 9:46 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: