diff options
author | Janne Heß <janne@hess.ooo> | 2023-08-20 11:05:46 +0200 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2023-08-21 09:07:14 +0200 |
commit | eb831f759bc2c98ef84a0a97c60e5ab0b73f309c (patch) | |
tree | 898bfbe0598458b9aca84c4ce9154a60b86bd595 /nixos/doc/manual/development | |
parent | 37b82444129052fe44919310c9b23398f0a44888 (diff) |
nixos/stc: Improve mount unit handling
We should sometimes restart the units rather than reloading them so the changes are actually applied. / and /nix are explicitly excluded because there was some very old issue where these were unmounted. I don't think this will affect many people since most people use fstab mounts instead but I plan to adapt this behavior for fstab mounts as well in the future (once I wrote a test for the fstab thingies).
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r-- | nixos/doc/manual/development/unit-handling.section.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/doc/manual/development/unit-handling.section.md b/nixos/doc/manual/development/unit-handling.section.md index a7ccb3dbd042d..32d44dbfff054 100644 --- a/nixos/doc/manual/development/unit-handling.section.md +++ b/nixos/doc/manual/development/unit-handling.section.md @@ -25,8 +25,11 @@ checks: since changes in their values are applied by systemd when systemd is reloaded. - - `.mount` units are **reload**ed. These mostly come from the `/etc/fstab` - parser. + - `.mount` units are **reload**ed if only their `Options` changed. If anything + else changed (like `What`), they are **restart**ed unless they are the mount + unit for `/` or `/nix` in which case they are reloaded to prevent the system + from crashing. Note that this is the case for `.mount` units and not for + mounts from `/etc/fstab`. These are explained in [](#sec-switching-systems). - `.socket` units are currently ignored. This is to be fixed at a later point. |