AsahiLinux / asahi-installer

Asahi Linux installer
MIT License
782 stars 104 forks source link

Unable to install; Large overhead without any snapshots #290

Open jasonw22 opened 1 week ago

jasonw22 commented 1 week ago

Are there other things that can cause APFS overhead besides time machine snapshots?

APFS [Macintosh HD] (2.00 TB, 6 volumes)
  Total size: 2.00 TB
  Free space: 418.62 GB
  Available space: 301.78 GB
  Overhead: 78.85 GB
  Minimum new size: 1.69 TB (84.88%)

  Warning: The selected partition has a large amount of overhead space.
  This prevents you from resizing the partition to a smaller size, even
  though macOS reports that space as free.

  This is usually caused by APFS snapshots used by Time Machine, which
  use up free disk space and block resizing the partition to a smaller
  size. It can also be caused by having a pending macOS upgrade.

  If you want to resize your partition to a smaller size, please complete
  any pending macOS upgrades and visit this link to learn how to manually
  delete Time Machine snapshots:

    https://alx.sh/tmcleanup

» Continue anyway? (y/N):
(base) jason@Jasons-MacBook-Air ~ % tmutil listlocalsnapshots /
Snapshots for disk /:
(base) jason@Jasons-MacBook-Air ~ %
PaulCharlton commented 6 days ago

see:

https://github.com/AsahiLinux/asahi-installer/issues/243#issue-2034552633

PaulCharlton commented 6 days ago

heuristic need updating:

https://github.com/AsahiLinux/asahi-installer/blob/5f0814ba90d2814081c2e9ed516675dd75ab3c6e/src/main.py#L718


the volume in question above has about 78GB overhead on a 2 TB partition ... we should likely use a percentage, or some multiple of a snapshot's increase in space used instead of a raw 16GB criteria.

16GB overhead is a drop in the water from a 2TB partition. even 78GB is reasonable under the circumstances.

see also #243

PaulCharlton commented 6 days ago

regarding the heuristic here:

https://github.com/AsahiLinux/asahi-installer/blob/5f0814ba90d2814081c2e9ed516675dd75ab3c6e/src/main.py#L718

it may be reasonable to set the minimum as "overhead + 16GB" instead of "16GB" ... ultimately a judgment call by the macOS user and how much disk space they want to set aside for macOS if they are actually using Linux.

marcan commented 3 days ago

The real question here is what causes overhead and how we can reduce it. The heuristic is just random. There is no evidence that a percentage approach is more correct. If you want to help this issue, please research what causes purgeable data in macOS so we can actually understand what is going on and where the overhead comes from, and whether we can clear it somehow.

@jasonw22 the installer clearly lets you continue there, so "Unable to install" is not correct. It's just a warning.