We may have been using APFS alongside HFS+ for four years now, since the former was introduced in High Sierra, but there’s still plenty of confusion as to how they work alongside one another. This primer explains how they differ structurally, and how basic tasks such as adding a new volume differ.
Unlike some file systems, unless you operate disks together in a RAID array, the two native Mac file systems don’t normally span across physically separate disks. Each disk is formatted using a GUID Partition Table (GPT), which maps out separate storage areas in partitions. Being separate, they can’t share storage space, and are normally considered to have fixed size, although you can repartition a disk, which can usually be accomplished without losing any of the existing data.
Partitions work differently depending on whether they are HFS+ or APFS.
An HFS+ volume is a partition, therefore has fixed size. Each HFS+ partition/volume has its single file system, within which you can create folders or directories which share the same storage space within that partition/volume.
An APFS partition is also known as a container, and can contain multiple APFS volumes, each with their own file systems, sharing the storage allocated to that partition/container. While you can set limits to the size of APFS volumes if you wish, they can normally grow to fill the whole container, but the total size of all volumes within a container can’t of course exceed the size of that container. Within each APFS volume, you then create folders or directories.
It has been said that an APFS volume is similar to an HFS+ folder, in that it shares the space within a container. However, that’s not a good comparison, as each APFS volume has its own file system, and functions as a separate storage unit, in that it can’t have clones from a different volume, has separate snapshots, and more.
These are summarised in the diagram below.
These differences come to the fore when you want to add a volume to an existing disk, which some find confusing. Because an HFS+ volume is a separate partition, to add an HFS+ volume you have to repartition the disk. Adding an APFS volume to an existing APFS container is far simpler: no change is made in the partition map, but the new volume is just added to the APFS container.
When you first erase or format any disk, you’re asked to choose whether to do so in APFS, HFS+ or other formats. In the great majority of cases, for general purpose storage, you should choose APFS. You can always add an HFS+ volume to it later if you need.
Good reasons for using HFS+ volumes in Catalina and later include:
- For Time Machine backups, if you’re still backing up to HFS+.
- For bootable macOS installers created from an installer app, which still require HFS+.
- When using a hard disk for general storage, to avoid incurring performance penalties resulting from fragmentation produced by APFS.
Note that in general it’s worth avoiding adding any partition or HFS+ volume to the internal storage you normally boot your Mac from. This is particularly true for Apple Silicon Macs: add an HFS+ partition/volume to their internal SSD and strange things can happen. As much as possible, you should work within the default three-container partition map of Apple Silicon Macs and avoid adding anything outside the macOS boot container.
The choice of format thus includes four for APFS, which determine the format used by the first APFS volume added to the container, two HFS+ options, together with two standard PC formats.
To change the partition map of a disk, select that disk at the left and click on the Partition tool.
Add a new HFS+ volume or APFS container by clicking on the + tool.
Disk Utility may then ask you to reconsider if you really want to add a new partition/container, or just an APFS volume.
To add an HFS+ volume, set the format of your new partition to either of the HFS+ options as appropriate, generally HFS+ Journaled.
Adding another APFS container is essentially the same, but set the format of the new partition/container to one of the APFS options instead.
If you just want to add another APFS volume to an existing APFS container, you don’t change the partition map at all. Instead, select the APFS container to which you want to add that volume, and click on the + Volume tool at the top.
You then set the format of that new volume.
There are only the four standard choices for APFS volumes available, of course, and it’s here that you can opt for your new volume to be encrypted if you wish.
Removing partitions and volumes proceeds along the same lines: to remove an HFS+ volume, you need to repartition the disk using the Partition tool, as you do to remove an APFS container and all the volumes within it. Removing an APFS volume is far simpler, as you simply select the volume to be removed and click the – Volume tool.
One more time
If you’ve got here and still aren’t sure:
- An HFS+ volume is a partition, and exists in the disk partition table. It can’t exist inside any other partition, but must be a partition in its own right.
- An APFS volume can only exist inside an APFS partition, also known as a container. It can’t exist as a partition in the disk partition table, only inside an APFS partition/container.