Apple's APFS file system is being developed as a replacement to HFS+ with a focus on encryption and scalability. Read these tips on setting up and implementing APFS.
With the introduction of iOS 10.3, Apple quietly added support for its latest file system: APFS. The file system has also been extended to watchOS 3.2, tvOS 10.2, and macOS Sierra, as of update 10.12.4.
APFS is being developed as a replacement to the HFS+ file system, which has been in use in Apple products since 1998. In contrast to HFS+, which was developed to work with legacy floppy drives and mechanical hard drives, APFS focuses on encryption while being optimized for solid-state, flash-based storage. Additionally, the new file system is being developed to scale across platforms, from the Apple Watch to the latest Mac Pro.
The current iteration of APFS is a beta product and should be treated as such until the final code is released. This means it should not be used on production or mission-critical systems and devices.
Limitations to APFS
Before diving into the steps necessary to set up an APFS on macOS Sierra, let's consider its limitations.
- Data integrity is used for metadata only--user data does not utilize checksums to verify data.
- Non-volatile RAM is not supported.
- File compression is not supported.
- APFS cannot be used with Time Machine, FileVault, or Fusion Drives. Also, startup volumes cannot be formatted for use with APFS.
- Only case-sensitive versions of APFS may be used.
Additionally, APFS may only be implemented from Terminal, as there is no GUI to allow for the process to be accomplished.
While these limitations may seem unorthodox, these current limitations do not reflect the finalized code and should be addressed when the completed product is released sometime in 2017.
SEE: Apple's first employee: The remarkable odyssey of Bill Fernandez (PDF download) (TechRepublic)
How to set up APFS
To set up APFS for testing on a secondary partition or external media, follow these steps.
1. Connect or insert the device you wish to configure for APFS.
2. Open Terminal and enter the following command to determine the device identifier (Figure A).
3. With the identifier, we can now create the container on the device by entering the command as follows (Figure B) (Figure C).
diskutil apfs createContainer /dev/disk2s2
Please note: APFS must be set up on a partition, as it does not allow for use on the entire disk. Incorrectly setting the identifier to the disk will display an error (Figure D).
4. With the newly created container set up, we must execute the following command to create a volume within the container which will allow for data to be stored on the device (Figure E).
That's it! The process is complete, and you can now use the APFS-enabled device for data storage.
A comparison of APFS and HFS+
As a test, the same amount of data (approximately 4 GB) was copied to a USB flash drive with HFS+ and APFS to determine the effects on storage. As you can see in Figure F and Figure G, it appears that APFS uses slightly less data than its HFS+ equivalent, though there seems to be a difference in how the file systems report total capacity and available storage space.
- Apple File System revealed at WWDC 2016, focused on encryption and SSD support (TechRepublic)
- Why Apple's APFS won't last 30 years (ZDNet)
- New Apple File System promises more speed, flexibility, reliability (ZDNet)
- Apple File System Guide: Guides and Sample Code (Apple)
- All-flash arrays gaining popularity but with unique side effects (TechRepublic)
- Cloud Data Storage Policy (Tech Pro Research)