Quantcast
You are not logged in, click here to log in.

This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Apr 23, 2009 7:30 PM by Martian  
Click to view SSGoku's profile Member 224 posts since
May 14, 2004
Reply

Apr 20, 2008 9:33 AM

Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image

When creating a blank disk image in 10.5.2, I've noticed that there are three options for image format: Read/Write Disk Image, Sparse Disk Image and Sparse Bundle Disk Image.

I know what a disk image is and have used the regular read/write disk image on several occasions, but I'm curious to know more about the sparse alternatives and what they are used for.

What is a Sparse Disk Image and what is a Sparse Bundle Disk Image?

thanks
Reply
Click to view Typhoon14's profile Old Hand 2,316 posts since
Feb 2, 2001
1. Apr 20, 2008 2:39 PM in response to: SSGoku
Re: Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image
A sparse disk image is an automatically expanding disk image. In other words, you can create a 50 gigabyte sparse disk image, yet only put 5 megs inside it. The disk image will only take up five megs of space on your harddisk, but will be capable of storing up to 50 gigs of data should you choose to add it. Note that it auto-expands but does not auto-contract. In other words, if you delete files from the image, you will not regain any free space on your harddisk (although you will on the image). Disk Utility can be used to "shrink" a sparse image, reclaiming any unused space on the image.

A sparse bundle is essentially the same thing, the only difference is that while a sparse image is one giant file on your disk, a sparse bundle is actually lots of small files (8 megabytes each). They work and look the same way, but you can right-click on a sparse bundle, select "show package contents" and see the individual 8 meg "bands".

The sparse bundle was introduced with OS 10.5 in order better support Time Machine (Especially with FileVault, where the entire home directory is a sparse bundle). Previously, a backup programme would see the image as one file, and if any changes had to been made to it, it would have to recopy the entire image. With sparse bundle, it can only copy the bands that have been changed since the last backup, so the backups are much quicker. It also is likely to decrease the chance of data loss, as you could conceivably restore parts of a damaged image.

Basically, if you want a sparse image, use the sparse bundle under 10.5. Only use the sparse image if you need backwards-compatibility with earlier versions of the Mac OS.
Click to view DAWproject's profile New Member 1 posts since
Jul 5, 2008
2. Apr 21, 2009 5:52 AM in response to: Typhoon14
Re: Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image
Hello,

Would you please explain exactly how "Disk Utility can be used to "shrink" a sparse image, reclaiming any unused space on the image." ..?

Thanks
:)
Click to view Typhoon14's profile Old Hand 2,316 posts since
Feb 2, 2001
3. Apr 22, 2009 5:29 PM in response to: DAWproject
Re: Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image
It looks like I may have erred in regards to claiming that you could shrink a sparseimage/bundle with Disk Utility. That said, it's still really easy to do. Just fire up Terminal and enter the following

hdiutil compact /path_to/yourimage.sparseimage

Or just hdiutil compact, then add a space and drag the image into the Terminal window to complete the path.
Click to view Martian's profile Old Hand 1,484 posts since
Sep 27, 2001
4. Apr 23, 2009 7:44 AM in response to: Typhoon14
Re: Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image
Great explanation, Typhoon14.

Is there a significant difference in access speed, reliability, or other factor between the three image types when using encryption? In other words, other than for backward compatibility, is there any reason not to use a Sparse Bundle Disk Image?

I use encrypted disk images for personal data, and with the drive sizes available today, space efficiency is not really a priority with these file types.

Click to view Typhoon14's profile Old Hand 2,316 posts since
Feb 2, 2001
5. Apr 23, 2009 11:57 AM in response to: Martian
Re: Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image
There should not be, and I myself have never experienced one (I use FileVault so have had lots of experience running the entire OS using both sparseimages and sparsebundles). In fact, if anything, breaking it into bands should increase reliability (if a single bands is corrupted, you may still be able to access your other data or even restore the damaged band from a backup), and in theory not having to write all data to one enormous file could yield performance increases when working with large images (I have not noticed a difference one way or another).
Click to view Martian's profile Old Hand 1,484 posts since
Sep 27, 2001
6. Apr 23, 2009 7:30 PM in response to: Typhoon14
Re: Disk Image vs. Sparse Disk Image vs. Sparse Bundle Disk Image
Thanks