6

Current situation: I have a large sparse bundle image whose size is reported as 91GB (cmd+I from Finder). Its contents, instead, are only 80GB. hdiutil compact does not shrink the image:

Starting to compact…
Reclaiming free space…
..............................................................................
Finishing compaction…
Reclaimed 0 bytes out of 25.6 GB possible.

So there are 11GB of space that I cannot recover.

How I got there: Before getting into this situation, I had ~27GB of smallish files (MP3s, from 2-8MB) that I deleted from the image. I then ran hdiutil compact, but it only recovered 16GB of those 27GB, leaving 11GB of wasted space.

Any idea? Google is failing me.

  • From the manpage for hdiutil: "Depending on the location of files in the hosted filesystem", compact may or may not shrink the image. 11GB may just be worth recreating the image. – ephsmith Jun 24 '12 at 4:10
  • Relevant question on ServerFault: serverfault.com/questions/14112/… – GDP2 Mar 26 at 4:56
4

Either recreate the image, or defragment and repeat hdiutil compact. For defragmentation, I use iDefrag.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .