PDA

View Full Version : sparse image keeps growing


digSD
03-06-2008, 06:43 PM
Hope this isn't a dumb question:

Situation: I am doing a backup (clone) to a sparse disk image. (This is because the destination is another Mac on the network, so I believe I have no choice except to use a disk image.) [BTW, I am using 10.4.11 and have no plans to move to 10.5, in case that's relevant.]

Here's the issue: the size of the disk image grows significantly each time, even if very few files actually need to be updated (the image seems to grow more than needed). It gets worse if I actually change a significant fraction of source files: the image (destination) first grows to accommodate the changes, but then does not shrink when source files are deleted. So, very quickly, the image (destination) becomes too large for the HD on which it is located. This is true even if the destination HD is much bigger than the source HD.

I hope this makes sense... any suggestions, other than periodically deleting the image and then doing a full (rather than update) backup?

Armand

dnanian
03-06-2008, 07:38 PM
There are a lot of posts here dealing with this exact issue, Armand: it's the way HFS+ handles deleted space, and there's really nothing we can do to make it not expand.

To recover the space, you can use hdiutil. Open Terminal, type:

hdiutil compact

with a space after it, then drag in the (unmounted) image file. Press Return at the end, and it'll recover the free space.

Bryanmc
03-10-2008, 03:18 PM
There are a lot of posts here dealing with this exact issue, Armand: it's the way HFS+ handles deleted space, and there's really nothing we can do to make it not expand.

To recover the space, you can use hdiutil. Open Terminal, type:

hdiutil compact

with a space after it, then drag in the (unmounted) image file. Press Return at the end, and it'll recover the free space.

Thanks for this tip!

And my post is proof that occasionally people will search before posting a new thread. :D

cavenewt
03-23-2008, 01:20 PM
There are a lot of posts here dealing with this exact issue, Armand: it's the way HFS+ handles deleted space, and there's really nothing we can do to make it not expand.

To recover the space, you can use hdiutil. Open Terminal, type:

hdiutil compact

with a space after it, then drag in the (unmounted) image file. Press Return at the end, and it'll recover the free space.

Hi Dave

What are the chances of adding this command as an option in SuperDuper? I will try to create something in Automator, but it'd sure be nice if SD could do it for us.

Always dreaming, aren't we?

Thanks, love SD and recommend it to all my clients.

dnanian
03-23-2008, 01:37 PM
It's something we're considering for the future...

cavenewt
03-23-2008, 10:12 PM
It's something we're considering for the future...

That's so great.

So, today I was setting up my new Time Capsule, and I got to wondering why Apple's sparseimage files aren't prone to this problem...

dnanian
03-23-2008, 11:37 PM
They're not using sparseimages. They're using sparsebundles, new to Leopard.

cavenewt
03-25-2008, 04:59 PM
Thank you, I was unaware of sparsebundles. The difference in file extension didn't register.