What APFS Does for You, and What You Can Do with APFS

Originally published at: https://tidbits.com/2018/07/23/what-apfs-does-for-you-and-what-you-can-do-with-apfs/

macOS High Sierra switched to APFS (Apple File System) for Macs with solid-state storage, but what does it do? Jeff Carlson explains why Apple made the change, how APFS works, and what it can do for you.

Are you sure that the default is that snapshots are created each hour? I have no snapshots on my disk (well, I didn’t until I manually created one), and other Internet sources seem to indicate that they are only automatically created before major system updates.

I was hoping this article would clarify the somewhat annoying behavior I’ve encountered. I purchased a (spinning platter) external drive and reformatted it as APFS (not knowing that might not be a good idea). In the process I partitioned it into two partitions. Now both partitions show up on my desktop and seem to work fine and show the capacity I intended for each - but the original volume also shows up on my desktop, still showing the full capacity of the unpartitioned original drive. I’m concerned that I’ll accidentally copy something to that original volume and in the process screw up my partitions - is there a way to make that original drive go away (at least not appear on the desktop)?

It’s much less than not a good idea, it’s unsupported by Apple and severely limits what the drive can be used for.

Paragon provides a lossless converter. Have not tried it myself, but they have a solid reputation.

https://www.paragon-software.com/home/apfs-hfs-converter/

-Al-

Good question, Jim. There’s some confusion about this. I was looking at this Apple Support article that reads:

" Your Time Machine backup disk might not always be available, so Time Machine also stores some of its backups on your built-in startup drive and other local drives. These backups are called local snapshots. One snapshot is saved every hour. If you’re using macOS High Sierra, another snapshot is saved before installing any macOS update."

However, looking at it again, it sounds like that’s just for the HFS+ local Time Machine backups, not APFS local snapshots.

Right now I’m not seeing anything other details, though a tickle in the back of my mind says I did see something more specific at some point. As it is, if I use tmutil listlocalsnapshots / on my machine right now, I see:

com.apple.TimeMachine.2018-07-23-014427
com.apple.TimeMachine.2018-07-23-031655
com.apple.TimeMachine.2018-07-23-113908
com.apple.TimeMachine.2018-07-23-123820
com.apple.TimeMachine.2018-07-23-143901

I haven’t done any system update checks today (unless maybe those were done in the background, but that seems quite aggressive).

Snapshots also depend on how much free space you have. Also, in the Time Machine pref pane, do you have Back Up Automatically selected? I wonder if that could also trigger the snapshots.

Steve, I’d say the best approach would be to make a duplicate of those partitions, then format the HDD as Mac OS Extended with new partitions and restore the data. Then you won’t have to wonder.

But your question points to one of the things that inspired this article and my book in the first place. There’s been a jumble of info out there about APFS. And I know that Apple still hasn’t documented everything sufficiently for developers.

You can install High Sierra on an HDD without the automatic conversion to APFS that you get with an SSD. However, I’ve been test driving the macOS 10.14 Mojave beta and it does automatically convert an HDD to APSF, without asking permission. On a clone of my Sierra system on a HFS+ hard drive Mojave runs slow as snot and often fails to start up at all. I’ve twice been obliged to reinstall the beta just to get it to upgrade to the latest version and then clone it back to an HFS+ partition, at which point it (sometimes) runs better. If it fails one more time I’ll give it up as a bad deal.

As for the destination between partitions and containers, that’s just too complex for this tired old brain to handle.

Before the launch of HS, there were kinda promises that APFS WOULD work on SSD based RAID arrays. Not a peep from Cupertino since then and try as I might to find out ANY information, nobody seems to know anything, not even speculation! Dummy that I can be at times, never thought to come here…

Been leary to even try and take my Sierra up to HS because I was concerned I’d complete trash my setup in the process… although the theory was that I SHOULD be able to go HS with it not trying to convert to APFS. As time went by, I figured that why not go from to Mohave… so the question remains will Mohave legitimately support arrays (and/or spinning drives), will it try to force convert to APFS and trash my array, or will it give me a choice?

Does anyone know if Apple has any plans to enable checksums for user data, as opposed to only Apple’s system metadata? Bit rot on user data does need to be addressed.

Blessings, and thank you!

This is the best description of APFS I’ve seen so far. The factory analogy does the trick. Thanks.

FYI: I’m testing the 10.14 Mojave beta. It automatically converted the partition on the external drive I’m using to APFS as Mojave was installed. It runs like a slug on my HDD. So I copied it to an HFS+ partition and it runs somewhat better. So Apple has not perfected APFS for hard drives yet in Mojave. The upside, however, is that it worked on one partition and didn’t affect the other partitions on the 3TB drive I’m using, which remained in HFS+ format.

No, I do not have Back Up Automatically selected; everything on this Mac is duplicated elsewhere.

I think I read in an article about APFS that one of it’s advantages is that it enables checksums on data, but I don’t know where I saw it. You might Google APFS-checksums to see what turns up.

Thanks for the reply, but I have researched it extensively. The only reports I have found are of Apple allowing checksums for their own data only, and not allowing checksums for user data. But thank you! ; - )

I recently had a problem with an external disk and APFS that I still cannot figure out.
I have some encrypted 1TB disk drives that use Thunderbolt connections. I have several of these and have used the Finder level Encryption (with Left click - encrypt). I found one of the new disks I had formatted could not be repaired with Disk Warrior and looked and it had container on it. I looked at the setting and it was formatted in APFS.

As I had heard that format was not optimized for hard drives, I decided to change it back. I do a lot of file copying to it and like to use Disk Warrior and other utilities to keep an eye on things and fix it up. Having it APFS left me with fewer options. So I copied the files over to a separate disk and reformatted the drive. I looked at some ways online to do that, but did not use the terminal to change the drive, just Disk Utility. I verified that it was the Apple Extended and then copied the files back and encrypted it again.

A few days later I looked at it again, and it was APFS again! Is there a way of changing it that it is permanent, or does the OS do this automatically? I am on High Sierra.

The thing that’s doing it is encrypting the disk in the Finder. I ran into this in my testing, and included it in my book:

If it’s a Mac OS Extended volume, however, there’s an odd wrinkle: When your startup disk is APFS-formatted, and you encrypt an external disk in the Finder using the steps above, the external disk’s format changes to APFS (Encrypted). That makes it incompatible with systems running earlier versions of macOS.

If you need to ensure compatibility with older systems, use Disk Utility to change the volume’s format to Mac OS Extended (Journaled, Encrypted), not by encrypting it from within the Finder.

2 Likes

Ray Kloss

I recently had a problem with an external disk and APFS that I still cannot figure out.

I have several of these and have used the Finder level Encryption (with Left click - encrypt). I found one of the new disks I had formatted could not be repaired with Disk Warrior and looked and it had container on it. I looked at the setting and it was formatted in APFS.

As I had heard that format was not optimized for hard drives, I decided to change it back. I do a lot of file copying to it and like to use Disk Warrior and other utilities to keep an eye on things and fix it up. Having it APFS left me with fewer options.

Not sure how hard drive optimization plays into your thinking here. Although you are correct about Disk Warrior, all the other drive utilities are at least mostly able to repair APFS issues, should they ever arise. I’ve been using several APFS external drives since the format first showed up in testing and none have suffered any damage to date that required repair. Seem to be at least somewhat more reliable.

So I copied the files over to a separate disk and reformatted the drive. I looked at some ways online to do that, but did not use the terminal to change the drive, just Disk Utility. I verified that it was the Apple Extended and then copied the files back and encrypted it again.

A few days later I looked at it again, and it was APFS again! Is there a way of changing it that it is permanent, or does the OS do this automatically? I am on High Sierra.

As already stated, FileVault is responsible for both CoreStorage and APFS formatting, so you will need to start out with an encrypted partition to avoid APFS. I’m not certain you can avoid CoreStorage by doing that, but Disk Warrior can still handle that.

-Al-

Thunderbolt it is. I have a hybrid drive, so my startup disk is not APFS.

I was able to use Disk Utility to make an encrypted disk and all looks fine. Thanks all.

I experienced the APFS the hard way. After upgrading to High Siera the time machine stopped working with the dreadful message “Time Machine completed a verification of your backups. To improve reliability Time Machine must complete a new backup for you.” Obviously pressing the OK button, not knowing that “a new backup” really means wiping out everything and starting fresh. Numerous error messages after that pointing that the time capsule was corrupted. After hours sitting at the genius bar fighting off the support staff convincing me that the only solution was to buy a new AirPort Time Capsule somehow we managed to mount the ATC. We manually deleted the backups and the snapshots and finally it worked at the end. I lost the history but the Capsule was saved. Apparently the issue was with the new APFS between the upgraded Sierra files on the MBP and the previous backup.
To the second point, your doubts are correct. After noticing a dramatic reduction in free space on my local SSD I realised that the local snapshots have taken out about 90GB. After deleting them through the terminal and disabling the automatic backup have managed to reclaim back the lost 90GB. Now I run only manual backups. As soon as you turn on the automatic backup the local snapshots are getting created taking up massive space.

I’m erasing the disk and reinstalling MacOS on an older (~2013) iMac which is already running High Sierra. When I erase, I’m asked to choose between APFS and MacOS Extended. The disk system is currently Journaled HFS+. Can I switch to APFS during the erase? According to step 6 in this article, Disk Utility is supposed to show a recommended format but it doesn’t have anything recommended.

If you install a version of macOS that wants APFS, it will do the reformat during installation, so it doesn’t really matter what you do before. It’s easiest and safest to stick with HFS+. In particular, if the Mac in question has a hard drive, HFS+ offers better performance (although Catalina will still reformat to APFS; Mojave will leave spinning disk drives at HFS+). With an SSD, APFS is somewhat better than HFS+, but again, let the macOS installer do the conversion if it wants to.