Sunday, May 16, 2021

Big Sur Really Needs Real Free Space

Howard Oakley:

Many of us have just installed the largest macOS update ever released by Apple (as far as I can tell), and there’s a few Macs which haven’t fared well.

My iMac died while making a copy of the macOS 11.3 installer, before I actually installed it. The spinning beachball showed up, and the Mac became completely unresponsive except for being able to move the cursor. I couldn’t even ssh in. After a few minutes, the display went black. I eventually had to power it off and start it up again, but it got stuck halfway through the boot progress bar, the one that shows the desktop picture. I assume the CPU use was high because the fan got very loud. Eventually it seemed to kernel panic and stopped. Several more attempts at booting all failed in the same way.

Safe Mode, resetting the PRAM, Apple Diagnostics—none of the normal stuff helped. I was able to boot from macOS Recovery as well as a clone. What if this were an M1 Mac that couldn’t boot from a clone? Would I be able to easily sync my files to another Mac while booted from Recovery? Of course, git is not available, so I couldn’t push my work in progress. It turns out that rsync is not available in Recovery, either, although the slower scp is. Unfortunately, despite the network activity, the Mac will fall asleep after about 15 minutes of copying, and scp—unlike rsync—cannot resume a copy.

I wanted to see what caused the problem but couldn’t find any kernel panic log files. Could that be because the SSD was full? No, Finder showed 37 GB free. I thought I remembered having more like 100 GB free, but 37 GB should be plenty to save a log file. Since Safe Mode and a different user account didn’t work, there must be something wrong with the system, despite the Signed System Volume. However, even with the 37 GB, macOS couldn’t be installed because the installer said there wasn’t enough free space. That sounded suspicious, but I offloaded another 20 GB or so of files and tried again. It still claimed not to have enough free space. It still wouldn’t boot.

Well, we already know that with APFS the free space that Finder shows is a lie. Maybe the SSD really is full, and the files that I just deleted are being retained by an APFS snapshot. Unfortunately, tmutil is not available in Recovery. Is there another way to see and delete snapshots? It turns out that diskutil can also do this. You can’t read the man page because man is not available in Recovery. But it does show some usage information if you invoke it without any arguments, or as diskutil apfs to see the APFS commands.

Here are the steps that I used:

  1. Even though Disk Utility showed my SSD’s Data volume as mounted, it was not actually available to the diskutil snapshot commands in Terminal. I had to mount it using diskutil apfs unlockVolume.
  2. To find the APFS Volume DiskIdentifier, use diskutil apfs list.
  3. To see the snapshots, use diskutil apfs listSnapshots [volume identifier]. This will also show you the disk number.
  4. To delete a snapshot, use diskutil apfs deleteSnapshot [disk number] -uuid [snapshot identifier]

After deleting a bunch of snapshots, enough real free space was created that I was able to boot the iMac normally. Unfortunately, the problem has repeated twice with macOS 11.3 over the last few weeks. The same fix always works. Most recently, Finder was showing 250 GB of free space, yet apparently the disk was full. I’ve now set a reminder to periodically delete old Time Machine snapshots, since macOS is not doing this automatically when it runs out of space, and I can’t trust how much space is shown as available.

Previously:

Update (2021-06-29): Sean Heber:

Well I got the computer to boot. Careful examination of those boot errors suggested it was out of space. Incidentally I had checked free space in Finder before rebooting it when it had first started acting odd. Finder reported like 100gb free so I had ruled that out.

After my reboot attempt, however, it would just hang at the apple logo screen. After wasting an hour waiting on it I rebooted in verbose mode and saw all the errors. Then I rebooted into recovery mode and used Terminal where “df” reported no free space whatsoever.

15 Comments RSS · Twitter

This is the kind of stuff Mac users used to poke fun at Windows users for having to deal with. :(

Beatrix Willius

They don't have an adult developers at Apple left, do they? Are they using their own software anymore?

Why is TimeMachine doing stuff on my hard disk when TimeMachine isn't even enabled?

John Rothlisberger

It sounds like there’s something wrong with the file system. With 250G free, why would it be filling up again, let alone repeatedly? I wouldn’t trust it, and would be planning a full backup / rebuild from scratch / restore cycle.

Regarding, "the Mac will fall asleep after about 15 minutes of copying", you can use `pmset` to change the duration after which the Mac goes to sleep.

pmset -a sleep 0 displaysleep 0 will set it to never sleep.

It’s just like their hardware, they don’t want us fixing it, they want us to buy new (or at least install vanilla MacOS from scratch). I had to reinstall completely to get any of the Big Sir updates to even install properly. Have worked fine ever since. Yes, even updates.

@John I guess there’s no way to be sure, but all the file system checks passed, and all my checksummed files verified correctly. I deal with lots of files, many of which are large, that are temporary. So it’s quite possible that 250 GB of files are actually being created and “deleted.”

@NP Thanks!

Richard Murray

"We wouldn't have these problems if Steve Jobs were still here." ™©

"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at and repair." - Douglas Adams

Tim Buchheim

I find the "caffeinate" utility to be extremely useful when booted from recovery mode. It can be used to prevent the system from sleeping until a command finishes, e.g., "caffeinate scp foo/bar remotehost:foo/bar"

Old Unix Geek

Honestly what you describe is horrific. I might need to upgrade to use XCode for a client... not looking forwards to it.

...and Apple still sells new machines with only 256 GB storage.

>Why is TimeMachine doing stuff on my hard disk when TimeMachine isn't even enabled?

My understanding is that checkbox controls whether snapshots are copied to a destination volume, not whether they are created. The Time Machine UI for restoring old states works regardless (I'm not sure if Recovery can also access these old copies?).

I don't believe disabling local snapshots is a thing any more. So, in a sense, TM cannot be turned off. (You could, however, aggressively keep deleting the snapshots.)

@Sören: On my copy of 11.3.1, at least, that seems to not be true. I've not enabled TM; the UI shows no restore points, and 'tmutil listlocalsnapshots /' likewise shows none.

@ me: are you on a desktop? I vaguely recall local snapshots defaulting to being on on laptops only.

@Sören: the subject machine is a 2020 MBP. 11.x freshly installed a couple of minor versions ago (so not upgraded, if that affects behavior).

Leave a Comment