MacOS – Is a Sparse Bundle image or Sparse Image better for many files 3 TB external hard drive 4TB

backupdisk-imagedisk-utilityhard drivemacos

I'm on a Mac and Windows PC, and have many files (videos, photos, documents, iTunes Backups, but without Windows or macOS system backup)
the size is 3TB or larger in my old external hard drive.
I use macOS 10.13.2 and Windows 10 (Build 1709)

I plan to copy this data into an single macOS Image and put it on the new external hard drives (4TB).

it is recommended to create a disk image (sparse image or sparse bundle image, I am not sure what is better) of macos with a single size of 4tb.

what file system (hfs+, apfs, exFAT) should the macos image have for the future?

are there any experiences with a single 4tb macOS image? are there any reports, where the image can no longer be opened by updating the system os? or other bugs? can you open it under windows?

This data that I use so far is a backup, no new data will be added. The data will not be edited, it should only be used for consumption.

are there users here who tested it, how was it? was it fast? were there problems?

Best Answer

It sounds like you are making a bootable image. In that case, you'll want to use one of these:

If those satisfy your needs, you can stop reading. If not, read on!

If you are simply storing a lot of Mac files and you want to do it using a Mac-native filesystem, you should use a sparse bundle. The man page for hdiutil helps explain this:

As of Mac OS X 10.5, a more reliable, efficient, and scalable sparse format, UDSB (SPARSEBUNDLE), is recommended for persistent sparse images as long as a backing bundle (directory) is acceptable.

Take note of that "backing bundle" statement -- it means that the file system on which your sparse bundle is stored must support directories with a large number of files (those are the bands of the sparse bundle). Remember, you have external hard drive disk itself to format before you place the sparse bundle image onto that disk.

The man page also gives the (huge) max size for a sparse bundle:

..the maximum [size] for SPARSEBUNDLE is just under 8 exabytes (2^63 - 512 bytes)

You can format the disk itself however you'd like, as long as the format supports the large number of files sparse bundles make in a single directory. Format your sparse bundle as HFS+ and then convert it to APFS in the future. The reason for this is there are still a few bugs in APFS, specifically regarding sparse bundles, cf. this well-explained bug report and video:

I noticed that an APFS-formatted sparsebundle disk image volume showed ample free space, despite that the underlying disk was completely full.

(2019 update: macOS Mojave resolved the free space issue above. Using an APFS sparse bundle on Mojave and newer can be safely recommended).

You can use Disk Utility to create your sparse bundle. If you are doing a lot of deleting from the sparse bundle, periodically run this command to remove unused bands and reclaim the space:

hdiutil compact /path/name.sparsebundle

Note that hdiutil compact only removes completely unused bands. So, deleting 10GB of data from your sparsebundle may only result in, say, 6GB of bands deleted when you compact. Reducing band size generally will make compact operations free up more space.

Related Question