mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
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:
parent
9f2d9ed82b
commit
910503b641
4 changed files with 102 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue