1

I am on macOS Sonoma, but I've noticed this since macOS Ventura. I created a sparse bundle disk image in Disk Utility, with a capacity of 100TB, encrypted, and in APFS.

Recently I keep running out of storage space and noticed that removing files from my sparse bundle actually affects my available storage space on Disk Utility, Macintosh HD (Get Info from Finder) and System Settings.

From my understanding, sparse bundles grow in file size, but it's not supposed to shrink by deleting data. Reclaiming space is something you have to do in Terminal, and even then, it doesn't reclaim that much.

I've tested and confirmed that adding and removing content from the volume does change Macintosh HD's available free space. It even lets me maximize space outside of it, which I would've assumed that the sparse bundle has already used up and could be just inaccurate.

But this does not appear to be the case at all. Is data somehow leaking or were sparse bundles changed at some point?

I should clarify, I move files between volumes, which copies then deletes. Maybe a move is actually different than a copy then delete. But I just want clarification.

2 Answers 2

1

In the world of Apple disk image formats, sparse file disk images are single files that grow when you write data to the disk image but don't shrink when you delete data from the disk image. You have to use Disk Utility or hdiutil to shrink them.

Sparse bundles, in contrast, are stored as a folder full of "band files" of a uniform size (typically 4KiB if I recall correctly). As you write data, more band files are created to store it. If you delete all the data that happened to be stored on a given band file, the band file is deleted. Thus, sparsebundle disk images automatically reclaim much of their unused disk space, so there isn't much space to reclaim with Disk Utility or hdiutil (only the empty parts of part-empty band files).

0

@Spiff Thanks for your explanations. Do you happen to know whether one can turn this dynamic resizing in macOS Sonoma off again?

I ask because sparsebundles have become substantially slower since BigSur (last macOS without automatic size adaptation), and the system is not working properly. An automatically shrunk sparsebundle which, when mounted, is said to be empty, still requires 500 GB on a 1 TB HD, whilst the Status Bar says 1 TB available (using the good old hdiutil compact does not help).

1

You must log in to answer this question.

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