Sparse Image

Captain Code

Moderator
Staff member
Mod
Has anyone used a sparce image created with Disk Utility? From the link that bobw posted earlier on FileVault it said it uses a sparce image and that it autoexpands. However, I created one and it doesn't auto expand, and I don't see any option for it to be auto expanding.
 
I think the idea behind a sparse image is that it auto-expands up to the size of the disk you create.

Example: If you create a regular 100 Mb disk image, it uses 100 Mb of your hard disk even if that disk image is empty. With a sparse image, if your 100 Mb disk image has only 5 Mb of stuff on it, it only takes up 5 Mb of space on your hard disk.

Btw, Apple suggests not using sparse images on a regular basis, because the way it does this trick encourages file fragmentation. I assume that File Vault has some way of getting around this.
 
I'd guess if you just made a sparse image that's really big (say 2 gigs or whatever) then it could grow as much as it needed. But like I said, any files you store on it are going to get fragmented quite quickly.

man hdiutil for more details.
 
Back
Top