Reconciler: uid/gid and ntfsfix for NTFS secondary mounts.

QA on 10.0.0.8 (mount-issues.md findings 2 and 3) showed the reconciler
path missed both NTFS accommodations that mount_drive() and
add_fstab_entry() already have: secondary NTFS drives mounted owned by
root (writable only via ntfs-3g's permissive default), and a dirty NTFS
volume would fail to mount at boot with no cleanup attempted.

Inject uid/gid for ntfs/ntfs3 in the reconciler, and run ntfsfix -d in
SubprocessMountExecutor before NTFS mounts (translating UUID=/LABEL=
specs to /dev/disk/by-* paths, which ntfsfix needs).  Also return an
error MountResult instead of raising when a binary is missing, per the
executor protocol.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-07-06 16:52:11 -06:00
parent 9f2d9ed82b
commit 910503b641
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
4 changed files with 102 additions and 3 deletions

View file

@ -149,11 +149,11 @@ class Reconciler:
return None
def _inject_uid_gid(self, entry: FstabEntry) -> str:
"""exfat/vfat have no POSIX permissions; without uid/gid the
"""exfat/vfat/ntfs have no POSIX permissions; without uid/gid the
mounted directory belongs to root and the wrolpi user cannot write
to it."""
to it. Covers both NTFS drivers, matching mount_drive()."""
options = entry.options or "defaults"
if entry.fstype not in ("exfat", "vfat"):
if entry.fstype not in ("exfat", "vfat", "ntfs", "ntfs3"):
return options
if "uid=" in options or "gid=" in options:
return options