diff --git a/configurations/server.nix b/configurations/server.nix index 349bc5d..6fe0b1a 100644 --- a/configurations/server.nix +++ b/configurations/server.nix @@ -41,6 +41,24 @@ (xlib.helpers.mkExfatMount { path = xlib.dirs.archive-drive; label = "archive"; + # Том `archive` (exfat, 466 ГБ, диск sda) НЕ нужен на пути загрузки: + # его не держит ни один юнит, `lsof +f -- /mnt/archive` пуст, нужен + # «когда понадобится». + # + # ЗАМЕР 2026-11-24 (после обрыва питания): проверка ФС этого тома + # занимала 7 мин 15 с на КАЖДОЙ загрузке — «Starting File System Check + # on /dev/disk/by-label/archive… 19:06:18» → «Finished … 19:13:33», и + # `systemd-analyze` показывал userspace 7min 13s, из них 7min 7s — + # systemd-fsck@dev-disk-by\x2dlabel-archive.service. + # + # Поэтому: noauto + x-systemd.automount. Проверка ФС НЕ отключается + # (noCheck не добавляем!) — она выполняется при ПЕРВОМ обращении к + # /mnt/archive (её поднимает automount), а не на пути загрузки. + # `mobile` ниже намеренно остаётся как есть: он грузится как раньше. + options = [ + "noauto" + "x-systemd.automount" + ]; }) // (xlib.helpers.mkExfatMount { path = xlib.dirs.mobile-drive; diff --git a/lib/xlib/helpers.nix b/lib/xlib/helpers.nix index ca00960..480d49f 100644 --- a/lib/xlib/helpers.nix +++ b/lib/xlib/helpers.nix @@ -121,11 +121,17 @@ let }; # exfat mount, e.g. fileSystems = mkExfatMount { path = ...; uuid = ...; } + # + # `options` (optional) is appended to the default ones (nofail, uid=, gid=). + # It exists for volumes that must NOT be fsck'ed on the boot path: pass + # [ "noauto" "x-systemd.automount" ] and the check still happens — but on + # the FIRST access to the mount point (automount), not on every boot. mkExfatMount = { path, uuid ? null, label ? null, + options ? [ ], }: { "${path}" = { @@ -135,7 +141,8 @@ let "nofail" "uid=${toString uid}" "gid=${toString gid}" - ]; + ] + ++ options; }; };