How to Manage an APFS Formatted Drive

Learn to format and create containers, plus more!

Disk Utility with sidebar open
Disk Utility's sidebar set to display all devices. Screen shot courtesy of Coyote Moon, Inc.

APFS (APple File System) brings with it some new concepts for formatting and managing your Mac's drives. Chief among these is working with containers that dynamically can share free space with any volumes contained within them.

To get the most out of the new file system, and learn a few new tricks for managing your Mac's storage system find out how to format drives with APFS, create, resize, and delete containers, and create APFS volumes that can have no size specified.

A note before we begin, this article specifically covers using Disk Utility for managing and manipulating APFS formatted drives. It is not intended as a general-purpose Disk Utility guide. If you need to work with HFS+ (Hierarchical File System Plus) formatted drives, take a look at the article: Using OS X's Disk Utility.

01
of 03

Format a Drive with APFS

Formatting a drive with APFS
Disk Utility can format a drive using APFS. Screen shot courtesy of Coyote Moon, Inc.

Using APFS as a disks format has a few restrictions you should be aware of:

  • Time Machine drives must be formatted as HFS+. This may change in the future, but for now, do not format or convert a Time Machine drive to APFS.
  • Apple does not recommend using APFS on standard rotational hard drives. APFS is best used on solid-state drives.
  • If you encrypt a drive using macOS High Sierra or later, the drive will be converted to APFS encrypted format. Be careful when doing this as some apps and utilities such as Time Machine will not work with the APFS format.

With that list of don'ts out of the way, let look at how to format a drive to use APFS.

General Instructions for Formatting a Drive to APFS
Warning: Formatting a drive will result in the loss of all data contained on the disk. Be sure you have a current backup.

  1. Launch Disk Utility located at /Applications/Utilities/
  2. From the Disk Utility toolbar, click the view button, then select the option to Show All Devices.
  3. In the sidebar, select the drive you wish to format with APFS. The sidebar shows all drives, containers, and volumes. The drive is the first entry at the top of each hierarchal tree.
  4. In the Disk Utility toolbar click the erase button.
  5. A sheet will drop down allowing you to pick the type of format and additional options to use.
  6. Use the Format drop-down menu to select one of the available APFS formats.
  7. Select GUID Partition Map as the formatting Scheme to use. You can select other schemes for use with Windows or older Macs.
  8. Provide a name. The name will be used for the single volume that is always created when formatting a drive. You can add additional volumes or delete this volume later on using the Create, Resize, and Delete Volumes instructions in this guide.
  9. When you have made your choices, click the Erase button.
  10. A sheet will drop down displaying a progress bar. Once the formatting is complete, click the Done button.
  11. Notice in the sidebar that an APFS container and a volume have been created.

Use the Creating Containers for an APFS Formatted Drive instructions to add or delete containers.

Converting an HFS+ Drive to APFS Without Losing Data
You can convert an existing volume to use the APFS format without losing information already present. I do recommend that you have a backup of the data before converting. It is possible that if something goes wrong while converting to APFS you could lose the data.

  • In the Disk Utility sidebar select the HFS+ volume you wish to convert. Remember the volume is the last item in the drives hierarchal tree.
  • From the Edit menu select Convert to APFS.
  • A sheet will display a warning that you are about to change to volumes format and that the change to APFS can’t be undone without losing data. If this is OK, click the Convert button.
02
of 03

Creating Containers for an APFS Formatted Drive

Disk Utility being used to create additional APFS containers.
Disk Utility uses the familiar partitioning system for creating additional APFS containers. Screen shot courtesy of Coyote Moon, Inc.

APFS brings a new concept to the format architecture of a drive. One of the many features included in APFS is its ability to change the size of a volume dynamically to meet the user's needs.

With the older HFS+ file system, you formatted a drive into one or more volumes. Each volume had a set size determined at the time of its creation. While it was true that under certain conditions a volume could be resized without losing information, those conditions often did not apply to the volume you actually needed to enlarge.

APFS does away with most of those old resizing restrictions by allowing volumes to acquire any of the unused space available on an APFS formatted drive. The shared unused space can be assigned to any volume where it is needed without worry about where the free space is physically stored. With one minor exception. The volumes and any free space must be within the same container.

Apple calls this feature Space Sharing and it allows multiple volumes regardless of the file system they may be using to share the available free space within the container.

Of course, you can also pre-assign volume sizes, specify minimum or maximum volume sizes as well. We will cover how to set volume limits later when we discuss creating volumes.

Create an APFS Container
Remember, Containers can only be created on APFS formatted drives if you need to change a drives format see the section Create an APFS Formatted Drive.

  1. Launch Disk Utility, located at /Applications/Utilities/
  2. In the Disk Utility window that opens, click on the View button, then select Show All Devices from the drop-down list.
  3. The Disk Utility sidebar will change to show physical drives, containers and volumes. The default for Disk Utility is to only show volumes in the sidebar.
  4. Select the drive you wish to add a container too. In the sidebar, the physical drive occupies the top of the hierarchical tree. Below the drive, you will see containers and volumes listed (if present). Remember, an APFS formatted drive will already have at least one container. This process will add an additional container.
  5. With the drive selected, click the Partition button in the Disk Utility toolbar.
  6. A sheet will drop down asking if you want to add a volume to the current container or partition the device. Click the Partition button.
  7. The Partition map will appear displaying a pie chart of the current partitions. To add an additional container click the plus (+) button.
  8. You can now give the new container a name, select a format, and give the container a size. Because Disk Utility uses the same partition map interface for creating volumes as well as containers it can be a bit confusing. Remember the name will apply to a volume that is automatically created within the new container, the format type refers to the volume, and the size you select will be the size of the new container.
  9. Make your selections and click Apply.
  10. A drop-down sheet will appear listing the changes that will occur. If it looks OK click the Partition button.

At this point you have created a new container that includes a single volume taking up most of the space within. You can now use the Create Volumes section to modify, add, or remove volumes within a container.

Deleting a Container

  1. To delete a container follow steps 1 through 6 above.
  2. You will be presented with the selected drives partition map. Select the partition/container you wish to remove. Remember any volumes within the container will also be deleted.
  3. Click the Minus (-) button, then click the Apply button.
  4. A drop-down sheet will list what is about to happen. Click the Partition button if everything looks OK.
03
of 03

Create, Resize, and Delete Volumes

Adding a volume to an APFS container.
Volumes are added to APFS containers. Make sure the correct container is selected in the sidebar before adding a volume. Screen shot courtesy of Coyote Moon, inc.

Containers share their space with one or more volumes contained within. When you create, resize or delete a volume it is always referenced to a specific container.

Creating a Volume

  1. With Disk Utility open (Follow steps 1 through 3 of Creating Containers for an APFS Formatted Drive), select from the sidebar the container you would like to create a new volume within.
  2. From the Disk Utility toolbar click the Add Volume button or select Add APFS Volume from the Edit menu.
  3. A sheet will drop down letting you give the new volume a name and to specify the volume's format. Once you have a name and format selected, click the Size Options button.
  4. Size options allow you to set a reserve Size; this is the minimum size the volume will have. Enter the Reserve Size. The Quota Size is used to set the maximum size the volume is allowed to expand to. Both values are optional, if no reserve size is set, the volume will only be as large as the amount of data it contains. If no quota size is set the volume only size limit will be based on the container size and the amount of space taken up by other volumes within the same container. Remember, the free space in a container is shared by all volumes within.
  5. Make your choices and click OK, then Click the Add button.

Deleting a Volume

  1. Select the volume you wish to remove from the Disk Utility sidebar.
  2. From the Disk Utility toolbar click the Volume (-) button or choose Delete APFS Volume from the Edit menu.
  3. A sheet will drop down warning you what is about to occur. Click the Delete button to continue the removal process.

Resizing a Volume
Because any free space within a container is automatically shared with all APFS volumes within the container, there is no need to force the resizing of a volume as was done with HFS+ volumes. Simply deleting data from one volume within a container will make that newly freed up space available to all volumes within.

At the moment there is no method available to change the reserve size or quota size options that are available when an APFS volume is originally created. It is likely the needed commands will be added to diskutil the command line tool used with Terminal at some point in a future macOS release. When the capability to edit the reserve and quota values becomes available we will update this article with the information.

Was this page helpful?