Disk Utility Creating Sparseimage & Sparsebundle Files Smaller Than Requested

Joined
Dec 5, 2008
Messages
713
Reaction score
43
Points
28
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Hello All!
I have been trying to make an encrypted sparseimage to store the contents of a small PC hard drive that I will erase.
(Disk Utility - File - New Image - Blank Image)

I asked Disk Utility to make it 8 GB in size. The resulting file turns out to be 52.6 Mb in size. I tried many times and received the same results.
I did notice that after changing from the default of 100 MB, Disk Utility will change it back to 100 MB after the password dialog is completed. Going back to change it back to 8 GB still results in a 52.6 MB file. (That's not a typo- It is megabytes)

My computer's hard drive has 54.04 GB free space left.

To be certain I was not misunderstanding, I tried copying files to the new image. The report was that it was too small.

Next I tried making a sparsebundle. I got the same results, except the file came in at 26.3 MB. Copying files to it gave the same failing results.
Interesting: The sparsebundle file size arrived at exactly half that of the sparseimage. Coincidence or Clue?

I have made both encrypted sparseimage and encrypted sparsebundles many times on this computer with success in choosing the size I needed.

Do you know what went haywire on today's attempts? (OS X 10.11.6)

Thanks!
Paul
 
Joined
May 21, 2012
Messages
10,731
Reaction score
1,185
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
Why don't you copy everything into a folder on your Mac, then turn it into an encrypted image?
 
OP
PGB1
Joined
Dec 5, 2008
Messages
713
Reaction score
43
Points
28
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Thanks, Bob.
I did your suggestion & it worked out well for this project.

I still wonder why I could not make a sparseimage or a sparsebundle at the size I chose. I used to be able to do as such. Curious!
 
Joined
May 21, 2012
Messages
10,731
Reaction score
1,185
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
Where did you find the procedure you were following, I (or someone else) may be able to test it for you. I haven't done it that often, but I usually do it the way I suggested.
 
OP
PGB1
Joined
Dec 5, 2008
Messages
713
Reaction score
43
Points
28
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Hi Bob,
I can't remember where I originally got the instructions, but I wrote them down and saved them the first time I made a sparseimage.
I've used them several times since then, both for sparseimage and sparsebundle.

Today, just to confirm that I am not reading them wrong (I have trouble reading sometimes), I did an internet search and found lots of pages with the same directions.

My Step-By-Step:
Open Disk Utility
File - New Image -Blank Image
Enter the Name in the Top Box of the pop-up
Enter the size
Enter the Format (OS X Extened Journaled)
Pick Encryption as 128 Bit
Enter & Confirm the password
Leave Partition as Single- GUID
Image Format - Choose Sparse Disk Image
Go Back To Size & Change It (Once Sparse Disk Image is selected, the size goes back to the default 100 MB. It always has done this)
Choose Create
Wait for Confirmation
 
Joined
May 21, 2012
Messages
10,731
Reaction score
1,185
Points
113
Location
Rhode Island
Your Mac's Specs
M1 Mac Studio, 11" iPad Pro 3rd Gen, iPhone 13 Pro Max, Watch Series 7, AirPods Pro
It does the same for me, makes a 42.1mb .sparseimage. BTW, I'm running Mojave (10.14.6).
 
Joined
Jan 1, 2009
Messages
15,491
Reaction score
3,852
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
Paul, I've not used sparse bundles that way, but my understanding is that you would mount the sparse bundle, then copy files to the mounted "drive." Is that what you did? I"m thinking that the 52MB file is just the structure of the virtual drive and that once mounted, it can accept data up to the size you defined. But as I said, I've not used one that way.
 
Joined
Oct 16, 2010
Messages
17,526
Reaction score
1,560
Points
113
Location
Brentwood Bay, BC, Canada
Your Mac's Specs
2011 27" iMac, 1TB(partitioned) SSD, 20GB, OS X 10.11.6 El Capitan
Maybe one needs to read and understand how sparseimages work and the limitations:
Sparse image - Wikipedia

Otherwise just follow Jake's suggestion, which I think is what Apple was expecting a user to do.

Or does OS X 10.11.6 just like to do things differently???



- Patrick
======
 
OP
PGB1
Joined
Dec 5, 2008
Messages
713
Reaction score
43
Points
28
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Thank You Everybody for helping me figure this out! I appreciate your time & expertise.

you would mount the sparse bundle, then copy files to the mounted "drive."

I"m thinking that the 52MB file is just the structure of the virtual drive and that once mounted, it can accept data up to the size you defined

The above is where things did not act like previous sparseimages that the computer made.
For Example- I specified 8 GB for the size. The sparesimage arrived at 52.6 Mb. I tried to move a 1 GB file in the mounted drive. The error was "Not Enough Space".

As written in the article Patrick linked, I like sparseimage because it will not take up its maximum specified drive space until filled.
A DMG, as I understand them, is full size since creation and takes up that much disk space no matter how many files are added.

I expected the 52.6 MB folder to accept the 1 GB file because the maximum I chose was 8 GB.
This is how the other sparseimages act on the computer.
For Example- If I made it to be 10 GB and it had 4 GB of stuff inside, Finder Get Info would show ca. 4 GB.
I could then add up to ca. 6 GB more to it and Get Info would show new size as the image expanded.

The new behavior is just, plain odd. Maybe an update to OS X came along which changed the rules since I made the last sparseimage.

Time Permitting, I'll explore around more with it today or tomorrow. I'd imagine there is one, little thing I'm doing wrong.

Enjoy This Day!
Paul
 
Joined
Jan 1, 2009
Messages
15,491
Reaction score
3,852
Points
113
Location
Winchester, VA
Your Mac's Specs
MBP 16" 2023 (M3 Pro), iPhone 15 Pro, plus ATVs, AWatch, MacMinis (multiple)
In Mojave, which is what I am running, instead of selecting the Sparse Image format, choose Sparse Bundle Disk Image. I just tried that and set the size of the bundle at 8GB, it created a 22Mb file, but accepted without complaint a 200Mb file as a test. The Image increased in size, of course, but it worked. That is what you want, a virtual drive that does not take space until you put something there.
 
OP
PGB1
Joined
Dec 5, 2008
Messages
713
Reaction score
43
Points
28
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
Thank You Jake for experimenting with Sparse Bundle and for reporting your results. It was nice of you to take the time to do these things.

This afternoon, I reset the P-RAM because the system clock was haywire & could not be set to the correct time and date. After that, I was able to make a Sparse Image that held the capacity I chose for it. What the PRAM has to do with a sparse image is well beyond my understanding- or perhaps it was a coincidence.

Oddly, the Get Info showed a very small size instead of the full capacity. As I add test files, the get-info reports the new size. That behavior seems more like a Sparse Bundle than a Sparse Image.

I next tried again making a few Sparse Bundle images (folders?).
All is working fine now. Hooray!
This afternoon, I got the same results that Jake reported.

In the past, I have always used Encrypted Sparse Image for my financial items because my former offsite backup plan (CrashPlan) would corrupt previous versions of Sparse Bundles, but not Sparse Images.
The new plan (iDrive) seems to have no troubles with previous versions for the Sparse Bundle folders that I tested this afternoon. (Sparse Image either)

I think I will take advantage of Sparse Bundle's kinder and gentler personality and move my Financial stuff into an Encrypted Sparse Bundle and get rid of the Sparse Images.

It is nice that Time Machine can backup only changed blocks from Sparse Bundle images, instead of backing up the whole folder. That should speed things along & use less backup disk space. (I add to & change files on that Financial folder just about daily.)

I am curious, however, if Time Machine can still "see" inside a Sparse Bundle if it is Encrypted & back up only changed blocks. If I can figure out how to know, I'll be sure to test this out of curiosity.

I really doubt the offsite backup plan can "see" inside and, truthfully, hope it can not.

Thanks Again Jake for testing!
Paul
 
Last edited:
OP
PGB1
Joined
Dec 5, 2008
Messages
713
Reaction score
43
Points
28
Location
Detroit
Your Mac's Specs
2007 Mac Book Pro 2.2 Ghz 4 GB RAM SSD OSX 10.11 & 2006 MBP Stuck At 10.6.8
In case anyone with questions looks at this post in the future, here are some Test Results-
I built Encrypted 2 sparse bundle images. Into each I copied the files from the existing sparse image files. (But didn't delete the image files yet- Just in case)
They each have about 2 GB of data in them.

I let Time Machine and my offsite service back them up while they were not mounted.
Time Machine took just over 5 minutes to back them up to my external drive connected to Firewire 800. (Mac Magic!)
The offsite service took 3-1/2 hours. I expected a long upload due to my 5 MB/s upload maximum speed.

Out of curiosity whether either service could "see" inside the encrypted files and only backup changed blocks, I added a file to each & let the services back them up again.
Time Machine took about a minute to back up the changed bundles (plus whatever else it had to backup)
The offsite service took about 3 minutes.
This shows that each can see inside the images & find blocks that were changed.

Next, I wanted to see what Restoring would preset:
Time Machine only shows the entire sparse bundle in the Enter Time Machine window & in by navigating through Finder to the disk.
At first I thought this might be a problem if I worked on, for example, 4 files and wrecked one.
Since Time Machine defaults to restoring to the original file location, when Time Machine restored the bundle, it would over-write the other 3 files as well.

Work-Arounds:
PLAN A-
a) Find the time of the file you wish to restore in Time Machine's card stack
b) Highlight the file name of the bundle
c) Click the Gear icon in the top of the window & click Restore file name To
d) Choose a different location for the restore's landing place.
e) Move any file from the restore to the original.
This leaves the original alone.

PLAN B-
Find the file in the back up drive's Finder window.
Drag it to where you want it.
Clunkier to use than in Time Machine's interface, but it worked.

The offsite storage plan (iDrive) shows, in its Restore window, the blocks.
But that is not useful because Finder only shows dates of the backup. I would not know what block to restore nor where to put it.

To restore from this offsite, one would have to restore the whole bundle to any location & find the file to move back to the original. Still easy enough.
A test of restoring a whole 1.98 GB bundle from offsite took about 4 minutes, so that's more than good enough for me.

SUMMARY-
The Sparse bundle files are much, much faster to backup than Sparse Image files. This was true with both Time Machine (local) and iDrive (offsite).
Restoring was about the same amount of time for the bundles and the images.

I never used sparse bundles before because my former offsite service (CrashPlan) could not handle them properly & caused many problems. Since iDrive is peaceful with them, I'll make the switch.

THANK YOU ALL!
Thank You all for helping me with the problem I had creating the sparse bundles and sparse images. I really appreciate the time you took and the education you provided.

Enjoy Today!
Paul
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top