This article looks at sparse bundles in Catalina 10.15.4: their structure, and how to work around the many bugs and incomplete features which might at first deter you from using them at all.A sparse bundle consists of a folder, the bundle, with the extension. Far more efficient are sparse versions, the sparse image (a single file) and sparse bundle (a structured folder pretending to be one file). Make a 1 GB disk image, and it requires a little more than 1 GB on disk. Do you really need an image of the partition, there might be better backup strategies dd is a very dangerous command, use of instead of if and you end up.The snag with conventional disk images is that they’re not particularly efficient.
![]() ![]() Compressed Image Backup Full Even WhenMacOS simply refuses to let you use the claimed free space on APFS sparse bundles, although HFS+ sparse bundles aren’t as unreliable.Catalina shows two different types of error when you try to copy what it feels is too much to your sparse bundle. Yet you’ll find it impossible to copy a 7 MB file to that sparse bundle, as you’ll be told that it’s full even when it’s completely empty. Whether you look at free space shown in the Finder or in Disk Utility, there is no correlation between what is shown and what is actually available for use in the sparse bundle.For example, the smallest APFS sparse bundle allowed is 8.4 MB, which is stated as having 8 MB of free space. If you eject the sparse bundle and mount it again, they should vanish.One of the strangest and most irritating bugs with sparse bundles in APFS format is the unreliability of their estimates of size and free space. Common sense would suggest that sparse bundles also shrink as contents are removed from them, but APFS sparse bundles don’t work according to common sense. I’ll describe later how to do this using Terminal.A sparse bundle is sparse in the sense that its disk storage grows (up to its set limit) to accommodate what you store in it. Sometimes, the new file is also created in the sparse bundle but abandoned there with zero size.If you try to copy across files which do exceed the capacity of the sparse volume, a different dialog appears, reporting that there isn’t enough disk space to perform the copy operation.If you click on the Manage Disk Space button in the hope that this offers a way of resizing the sparse bundle, you’re in for a shock, as it instead opens the storage management options available in the Storage tab of About This Mac, which is both irrelevant and purposeless.In fact, the only way to address this issue is by resizing the sparse bundle, which can’t even be performed in Disk Utility. That sounds like magic, or inefficient use of space in the first place.The maximum size of any sparse bundle is determined when it is created, but can be changed either up or down later when you wish. Output following that should resembleReclaimed 41.5 MB out of 950.3 MB possible.Compaction can be so successful that it reduces the size of the sparse bundle to smaller than when it was originally created. Neither is there any feature in Disk Utility to shrink a sparse bundle to the size that’s required for its current contents.The only way to perform this basic housekeeping task is to eject the sparse bundle and resort to Terminal, using the commandFor example. Sadly, I can find no evidence of that from looking through the storage bands inside sparse bundles. In this article, I wondered whether the sparse bundle format used error-correcting code to improve resilience against corruption. At least one bug has been fixed in working with sparse bundles over the past year.I bring one disappointment, though. If you hit that problem, I’ve described how to do this, but it’s no longer necessary in Catalina. Before resizing, ensure the sparse bundle is unmounted then check the limits imposed on it using the commandHdiutil resize -limits myDocuments.sparsebundleHdiutil resize -size 20m myDocuments.sparsebundleGiving the new size in MB (m), GB (g), etc.When I last looked at this resizing process a year ago using Mojave, this wasn’t sufficient, as resizing failed to expand the container, so a more elaborate procedure also had to be performed in Terminal to rectify that. Why this feature continues to be omitted from Disk Utility I don’t know. Tencent buddy emulator for macYou can only do that with hdiutil. Disk Utility remains of early beta-test quality and far from complete.Another thing that is not included in Disk Utility is the ability to encrypt sparsebundles (and DMGs) with a user’s public S/MIME certificate instead (or alongside) of a password. Their inability to self-compact is a major failing which makes their use clumsy at best, and Disk Utility’s lack of support for basic maintenance functions through the last 2.5 years reflects badly on Apple’s engineering priorities. They’re not smart, just lucky.Despite their widespread use and advantages, macOS features supporting the use of APFS-format sparse bundles are at present riddled with bugs (I count 6 above) and have serious shortcomings. But if any of the file system structures within the bands are damaged, the sparse bundle will be irrevocably broken. So in a corporate setting it might be better to create an intermediate certificate for your team and use the -cacert option instead of -pubkey and individual leafs… or create one leaf certificate incl. But use too many of those, and the hdiutil command will crash. You can encrypt a sparsebundle with multiple S/MIME certificates, so the respective owners of their private keys can all access the encrypted volume. Sparseimage format (which I’ve used for years) less buggy than. However, I have a few questions…In general, is the encrypted. The numerous bugs and gotchas you describe might be enough to send me running away from sparse bundles (which I have no experience with) as fast as I can. And it adds yet another bug, and (as so often) Apple didn’t care to include features in the GUI version of their programs.Thanks for the detailed article, Howard. At any rate, it’s actually a really nice feature, though sparsebundles in the cloud are not suited for simultaneous write access by several users.
0 Comments
Leave a Reply. |
AuthorKia ArchivesCategories |