HOME

TheInfoList



OR:

A sparse image is a type of
disk image A disk image, in computing, is a computer file containing the contents and structure of a disk volume or of an entire data storage device, such as a hard disk drive, tape drive, floppy disk, optical disc, or USB flash drive. A disk image is usu ...
file used on
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
that grows in size as the user adds data to the image, taking up only as much disk space as stored in it. Encrypted sparse image files are used to secure a user's home directory by the
FileVault FileVault is a disk encryption program in Mac OS X 10.3 (2003) and later. It performs on-the-fly encryption with volumes on Mac computers. Versions and key features FileVault was introduced with Mac OS X Panther (10.3), and could only be a ...
feature in Mac OS X Snow Leopard and earlier. Sparse images can be created using
Disk Utility A disk utility is a utility program that allows a user to perform various functions on a computer disk, such as disk partitioning and logical volume management, as well as multiple smaller tasks such as changing drive letters and other mount p ...
. Unlike a full image file (), which takes up as much actual space as the real disk it represents (regardless of the amount of unused space), a sparse image file () takes up only as much actual disk space as the data contained within, up to a maximum of the capacity assigned during creation.


Limitations

Two limitations are therefore worth noting regarding the use of this image file format: # A customized ".sparseimage" image file can be assigned a larger total capacity than the physical volume (or HD partition) on which it originally resides. While the virtual volume will seem to make that capacity available, attempting to exceed the physical capacity of the underlying volume will result in a disk error: "ran out of space". The file must first be moved to a larger physical disk or partition. # As noted above, while mounted image files automatically expand to their preassigned limit when data is added, they cannot be arbitrarily resized without the use of
Disk Utility A disk utility is a utility program that allows a user to perform various functions on a computer disk, such as disk partitioning and logical volume management, as well as multiple smaller tasks such as changing drive letters and other mount p ...
, , or other such software.


Sparse bundle disk images

Mac OS X Leopard Mac OS X Leopard (version 10.5) is the sixth major release of macOS, Apple's desktop and server operating system for Macintosh computers. Leopard was released on October 26, 2007 as the successor of Mac OS X 10.4 Tiger, and is available in two ...
introduced the concept of the ''sparse bundle''. Instead of a single big file, a sparse bundle is a bundle (directory) containing a number of files called ''bands'', each on the order of 8 MB in size. This means even though to the end user the sparse bundle appears as a single file, it is composed of smaller files. As of Mac OS X 10.8, the bands are 8 MiB () each. When the content of the image changes, one or more band files is changed, created, or deleted. This allows easier shrinking of the amount of space used on the underlying filesystem when the a large amount of data is deleted inside the disk image, as long as the code supporting the filesystem inside the image notifies the kernel of the "releasing" of blocks, as happens in filesystems that support SSD "trim" operations to be triggered automatically for de-allocated filesystem blocks. Sparse bundle advantages over non-diskimage backup for
Time Machine Time travel is the concept of movement between certain points in time, analogous to movement between different points in space by an object or a person, typically with the use of a hypothetical device known as a time machine. Time travel is a ...
: * the backup destination no longer needs to be an HFS+/HFSX volume (for the hard links to work and to preserve metadata), but can be any shared folder, on any server, connected using any protocol and using any file system to store the actual files * the entire sparse bundle is replicable from one location to another; this is particularly useful when upgrading the backup storage and when the on-site backup storage needs to be replicated to an off-site backup storage. A tool such as
rsync rsync is a utility for efficiently transferring and synchronizing files between a computer and a storage drive and across networked computers by comparing the modification times and sizes of files. It is commonly found on Unix-like operatin ...
may be used to keep one or more disk images consistent across various systems.


References


External links

* - a
FUSE Fuse or FUSE may refer to: Devices * Fuse (electrical), a device used in electrical systems to protect against excessive current ** Fuse (automotive), a class of fuses for vehicles * Fuse (hydraulic), a device used in hydraulic systems to prote ...
filesystem for reading macOS sparse-bundle disk images MacOS Disk images {{mac-stub