v0.12.5: drive-type-aware cross-drive backup validation
Fix cross-drive backup failing for system-drive destinations. The /mnt/hdd_placeholder folder is on the internal SSD, so IsMountPoint() returned false and the old code hard-blocked it. - ValidateDestination() (crossdrive.go): onSystemDrive flag replaces boolean-only check; system drives require ≥10 GB free and <90% usage to protect OS stability; external drives just need ≥100 MB free. - CheckBackupDestination() (mounts_linux.go): Tier 4 now branches on h.SystemDrive; system drive blocks at <10 GB free or ≥90% usage (matches runner enforcement); external drive unchanged (warn 90%, block 95%). Removes the && h.Severity == "ok" guard that was preventing system-drive critical messages from overriding warnings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
## Changelog
|
||||
|
||||
### What was just completed (2026-02-18 session 41)
|
||||
- **v0.12.5 — Cross-Drive Backup Validation Fix:**
|
||||
|
||||
**Root cause:** Immich cross-drive backup failed with `destination /mnt/hdd_placeholder is not a mount point` because `ValidateDestination()` hard-blocked non-mount-point destinations. The `/mnt/hdd_placeholder` folder is on the internal SSD (not a separate mount), so the device-ID check returned false.
|
||||
|
||||
**Fix 1: Drive-type-aware space checks in `ValidateDestination` (`internal/backup/crossdrive.go`)**
|
||||
- `onSystemDrive` flag replaces the previous boolean-only mount-point check
|
||||
- System-drive destinations: require **≥10 GB free** and **<90% usage** to protect OS stability
|
||||
- External-drive destinations: require **≥100 MB free** (original threshold)
|
||||
- Updated function comment to reflect the new tiered logic
|
||||
|
||||
**Fix 2: Aligned `CheckBackupDestination` UI thresholds for system drives (`internal/system/mounts_linux.go`)**
|
||||
- Tier 4 disk checks now branch on `h.SystemDrive` flag (set in Tier 3)
|
||||
- System drive: block at <10 GB free OR ≥90% used (matches runner enforcement); Hungarian warning messages
|
||||
- External drive: warn at ≥90% used, block at ≥95% used (unchanged)
|
||||
- Removed the `&& h.Severity == "ok"` guard that prevented system-drive warnings from being overridden properly
|
||||
|
||||
**Files modified (2):** `internal/backup/crossdrive.go`, `internal/system/mounts_linux.go`
|
||||
|
||||
### What was just completed (2026-02-18 session 40)
|
||||
- **v0.12.4 — Correctness & Robustness Bug Fixes (TASK.md — 15 bugs fixed):**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user