Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Multiple Time Machine local snapshots

I've got am up to date High Sierra mac running APFS on a 1TB SSD. There is a time machine backup disk always attached to the machine. In this case I understood that there would be no time machine snapshots since the real time machine disk is always there.


I ended up running out of disk space and noted that I only had 31G free on my root drive. I found some remnants of video conversation files lying around and removed these via the command line (i.e. they didn't go into the trash) but the space wasn't freed up (df -h showed the same amount).


When doing the 'df' I noticed that I had 6 mounts of snapshots for time machine as well. A bit of googling around and I ran the command tmutil thinlocalsnapshots /Volumes/com.apple.TimeMachine.localsnapshots 20000000000 1

and after a while, the mount points vanished and I got my free space back.


My questions are:

  1. Why am I getting local snapshots when my backup disk is always connected? (Just in case there was something wrong with it, I reformatted and added it again and something like the same problem re-appeared a couple of days later.
  2. What does the magic 'tmutil thinlocalsnapshots' command actually do? The manual page is wonderfully vague on it, and I ran it becuase I knew I had backups elsewhere should the worst come to the worst, but if anyone can clarify what it really does, I'd be grateful.

Many thanks to anyone who can explain/help.


Jimmy

iMac (Retina 5K, 27-inch, 2017), macOS High Sierra (10.13.6), 1GB SSD

Posted on Nov 21, 2018 6:20 AM

Reply
Question marked as Best reply

Posted on Nov 21, 2018 6:43 AM

1. That's the way it works. More backups are always better. The system is supposed to automatically thin snapshots. You shouldn't be running out of disk space or having to manually run that command. Unfortunately, there is a very long list of bugs in recent versions of macOS that shouldn't be there. I don't have an answer for you on that one.


Maybe if you could provide more information about what happened. You said that you ran out of disk space and had 31 GB free. You can't have both. 31 GB is probably not low enough to trigger any automatic thinning. Unfortunately, the operating system is designed to fill up both your RAM and your hard drive. Then you'll be encouraged to use iCloud with a paid subscription. And you'll be encouraged to upgrade with even less free disk space (Upgrade to macOS Mojave - Official Apple Support). If you have a 1 TB SSD, try to keep your free space over 100 GB. You can go down to 50 GB pretty safely. But go less than that and strange things will start happening.


2. It is pretty self-explanatory. The operating system is supposed to do this for you. Curiously, the command you ran was actually wrong. It should have been just "tmutil thinlocalsnapshots /".


Otherwise, the new filesystem is not well understood by anyone outside Apple, and perhaps inside. Apple did finally publish very low-level specifications for it, but Apple has pretty much abandoned any kind of documentation at the system admin level. Programmers get a little bit. End users get support pages. But there is nothing in between anymore.

Similar questions

6 replies
Question marked as Best reply

Nov 21, 2018 6:43 AM in response to apjimmy

1. That's the way it works. More backups are always better. The system is supposed to automatically thin snapshots. You shouldn't be running out of disk space or having to manually run that command. Unfortunately, there is a very long list of bugs in recent versions of macOS that shouldn't be there. I don't have an answer for you on that one.


Maybe if you could provide more information about what happened. You said that you ran out of disk space and had 31 GB free. You can't have both. 31 GB is probably not low enough to trigger any automatic thinning. Unfortunately, the operating system is designed to fill up both your RAM and your hard drive. Then you'll be encouraged to use iCloud with a paid subscription. And you'll be encouraged to upgrade with even less free disk space (Upgrade to macOS Mojave - Official Apple Support). If you have a 1 TB SSD, try to keep your free space over 100 GB. You can go down to 50 GB pretty safely. But go less than that and strange things will start happening.


2. It is pretty self-explanatory. The operating system is supposed to do this for you. Curiously, the command you ran was actually wrong. It should have been just "tmutil thinlocalsnapshots /".


Otherwise, the new filesystem is not well understood by anyone outside Apple, and perhaps inside. Apple did finally publish very low-level specifications for it, but Apple has pretty much abandoned any kind of documentation at the system admin level. Programmers get a little bit. End users get support pages. But there is nothing in between anymore.

Nov 21, 2018 6:48 AM in response to apjimmy

apjimmy wrote:


I've got am up to date High Sierra mac running APFS on a 1TB SSD. There is a time machine backup disk always attached to the machine. In this case I understood that there would be no time machine snapshots since the real time machine disk is always there.



That's not the way local backups are supposed to work. TM makes local backups whether your backup is connected or not:

About Time Machine local snapshots - Apple Support

Of course TM doesn't always do what it's supposed to as you found out.

For more information on the thinlocalsnapshots command see this:

How to thin your local Time Machine Snapshots on macOS High Sierra - Ask Different

Nov 21, 2018 6:35 AM in response to apjimmy

High Jimmy,


How to thin your local Time Machine Snapshots on macOS High Sierra - Ask Different

These snapshots are designed to help you recover deleted files or previous versions of files, even if your laptop is away from its Time Machine drive for a while. Your Mac automatically creates them in the background, and the Time Machine icon on your menu bar won’t even say it’s doing anything as it does so. These local snapshots are stored on your Mac’s startup partition along with all your other files.

How to Free Up Space Used By Time Machine’s Local Backups on Your Mac

Nov 21, 2018 6:49 AM in response to BDAqua

Hi,


I found the first article when I was looking, but failed to find the 2nd, so many thanks for the pointer to that one.

However, there's still no real explanation of what "purge_amount" and "urgency" actually do when running thinlocalsnaphots.


Also, in the 2nd article linked I saw the information about disabling local snaphots, and though that would be how I wanted to go ahead just to find out the High Sierra has removed that option from the tmutil command.


My problem was that I was low on disk space so removed large amount of space (about 90G). Due to these local snapshots, they were keeping links to that, now freed, space.


In subsequent purges of my disk, I've found that these local snapshots keep me from reclaiming space I need for scratch work, and the only way around is to either thin them all down with the command above and then carry on with the work.


Wish there was a way to stop this local snapshots now, but it looks like this has been removed in HS.

Nov 21, 2018 7:07 AM in response to etresoft

Maybe if you could provide more information about what happened. You said that you ran out of disk space and had 31 GB free. You can't have both. 31 GB is probably not low enough to trigger any automatic thinning.


Sorry, I should have been clearer I was rapidly running out of disk space and so I wanted to free some up so that I could continue working. I always like to have more than 10% free (my old Berkeley filesystem roots showing here...) I knew I was about to create about 20G of temporary files at least, so the 31G was a bit too close to the line for me. I found the files I wanted to delete, and removed them "freeing" up about 50G.


Now I understand a bit more about the local snapshots, in reality I was probably just "removing a link" to these files (to use the Unix parlance that I know) and until the last link is removed, I assume the space will still be used.


So, in future, if I clear up a lot of space on the filesystem, I'll just thin the snapshots to get my "real" space back.


It looks like I am an outlier use case in that I can see local snapshots working really well for small deltas in file system usage, but they seem to fall down when a large amount of data is removed from the filesystem.



Many thanks to you and the other people who have pointed me to articles or explain it more fully. I appreciate the time put in.


Jimmy

Nov 21, 2018 3:18 PM in response to apjimmy

apjimmy wrote:


Sorry, I should have been clearer I was rapidly running out of disk space and so I wanted to free some up so that I could continue working. I always like to have more than 10% free (my old Berkeley filesystem roots showing here...) I knew I was about to create about 20G of temporary files at least, so the 31G was a bit too close to the line for me. I found the files I wanted to delete, and removed them "freeing" up about 50G.

OK. Thanks for the clarification. There have been a number of recent posts where people get confused about buggy results in "About this Mac" > Storage > Manage. Their "System" values range from 90 GB to 2.5 TB which it should be about 56 GB. But then there are very similar reports from people who have completely run out of disk space and got a system message to that effect. It's a mess.


Now I understand a bit more about the local snapshots, in reality I was probably just "removing a link" to these files (to use the Unix parlance that I know) and until the last link is removed, I assume the space will still be used.

That's not necessarily the case anymore. You can still use hard links and they do behave that way. But APFS local snapshots add a whole new wrinkle. You can think of a snapshot as essentially a redundant filesystem full of hard links to all of your old files. Technically, I think it actually works on the block level, so one layer below UNIX hard links.


But the problem is that the allocated disk space is not shown anywhere. It's just gone.


And to complicate issues even further, many of the reports I mentioned above also include suggestions to thin or delete local snapshots. Depending on what the actual issue is, that may or may not work, leaving most people completely confused.



So, in future, if I clear up a lot of space on the filesystem, I'll just thin the snapshots to get my "real" space back.

In theory, that should happen automatically, but on some system schedule, not immediately.


It looks like I am an outlier use case in that I can see local snapshots working really well for small deltas in file system usage, but they seem to fall down when a large amount of data is removed from the filesystem.

I think you are only an outlier in the sense that you were really paying attention and investigated. The large amount of data being removed in this case made it easy to identify the cause and verify the solution. Snapshots are typically small and typically don't need to be thinned immediately. I think if you hadn't been so attentive and forged ahead, it might have automatically thinned those files. Or you might have run out of disk space. No way to tell.

Multiple Time Machine local snapshots

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.