You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3a8820f
Browse filesBrowse the repository at this point in the historyBrowse files
linux_name2
committed
docs: add disk space checks, troubleshooting, update GC section
Copy file name to clipboardExpand all lines: README.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ The system has two layers preventing accidental direct upgrades, controlled by a
192
192
- Upgrades via `atomic-upgrade` (env var + lock verification)
193
193
- Upgrades via AUR helpers (`yay`, `paru`, `pikaur`, `aura`)
194
194
195
-
**Pacman wrapper** (`/usr/local/bin/pacman`) — intercepts `pacman -Syu` and suggests `atomic-upgrade` instead. Detects AUR helpers to avoid double prompts. Also warns about `-Sy` without `-u` (partial upgrade risk).
195
+
**Pacman wrapper** (`/usr/local/bin/pacman`) — intercepts `pacman -Syu` and suggests `atomic-upgrade` instead. Detects AUR helpers as parent processes to avoid double prompts. Also warns about `-Sy` without `-u` (partial upgrade risk).
196
196
197
197
Both layers check `UPGRADE_GUARD` at runtime — the change takes effect immediately, no restart or file removal needed.
> upgrade applies to the live system and is **not atomic**. The next
239
239
> `atomic-upgrade` will snapshot whatever state the live system is in.
240
240
241
+
## Disk space checks
242
+
243
+
Before creating a snapshot, `atomic-upgrade` checks available disk space on both the Btrfs filesystem and the ESP:
244
+
245
+
-**Btrfs**: blocks only when free space is below the percentage threshold (default 10%) **and** below 2 GB absolute. On large disks where free percentage is low but tens of gigabytes are available, the operation proceeds with a warning.
246
+
-**ESP**: requires at least 250 MB free (one UKI is typically 50–150 MB).
247
+
248
+
If disk space cannot be determined (e.g. `btrfs` and `df` both fail), a warning is shown and the operation proceeds.
249
+
241
250
## Garbage collection
242
251
243
252
`atomic-gc` and the GC phase of `atomic-upgrade` keep the last N generations (default 3) plus the currently booted one. After deleting old generations, an orphan sweep removes:
244
253
-`root-*` subvolumes that have no matching UKI on the ESP
245
254
- UKI files on the ESP that have no matching subvolume
246
255
256
+
If the ESP is not mounted during the orphan sweep phase, it is skipped with a warning — orphans will be cleaned up on the next run.
|`completions/`| Zsh and bash tab completions for `atomic-gc` and `atomic-rebuild-uki`|
260
271
272
+
## Troubleshooting
273
+
274
+
### fstab uses `subvolid=` without `subvol=`
275
+
276
+
`atomic-upgrade` requires a `subvol=` option in the root fstab entry to track which generation is active. If your fstab uses only `subvolid=`, add `subvol=/your-current-subvol` to the mount options:
> **Note:** When both `subvolid=` and `subvol=` are present, some kernels prioritize `subvolid=`. Consider removing `subvolid=` from fstab to avoid conflicts after generation switches.
287
+
288
+
### Low disk space warning on large disks
289
+
290
+
On disks larger than ~200 GB, the free percentage may drop below 10% while absolute free space is still well above 2 GB. In this case, `atomic-upgrade` shows a warning but proceeds normally. The operation is only blocked when both the percentage **and** absolute thresholds are crossed.
0 commit comments