Open xaverdh opened 5 years ago
Somewhat related, the nilfs_cleanerd
garbage collection daemon appears to not get started when the filesystem is mounted from the initrd
. Probably because the mount helper is bypassed?
Ok, I attempted to add a module for nilfs2. What I can't figure out, is how to make nilfs_cleanerd
run in a sane way. It should get started by mount, but isn't? Even if started explicitly from initrd
, that doesn't seem to survive (is that expected?).
that doesn't seem to survive (is that expected?).
Yes: https://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/ So either:
@
at the beginning of argv[0]
, e.g. using ( exec -a @nilfs_cleanerd nilfs_cleanerd ) &
Ah, thanks for the reference! I'm not quite sure if it needs to run form initrd
. It better run from initrd
if there is a chance that the root filesystem becomes full and the system needs to write stuff for booting... not sure how realistic that is. Otherwise it should be fine to run in a systemd
service after startup.
There is one additional issue with e.g. the nix store though: nilfs_cleanerd
will only run on an rw mount. Not sure what the right approach is here, maybe the solution doesn't have to be in the official module. People with that setup can just add an additional rw mount..
Ok, so I think mounting the filesystem rw on a separate mount point is a good solution. If I find a better one, I will file another pr. In the meantime I would consider #65748 to be quite useful on its own.
The read-only /nix/store
mount is generally just a bind mount piggy-backing on the read-write /
or /nix
mount, and shouldn't break it I think (and for writing to the store, nix remounts it read-write in a separate mount namespace).
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/github-was-purchased-by-microsoft/313/57
Hello, I'm a bot and I thank you in the name of the community for opening this issue.
To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.
The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.
Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.
This issues stil exist in 21.11
Still exist as of today in nixpkgs-unstable
I tried using nilfs2 as file system for the nix store, and found that I had to manually add
initrd.kernelModules = [ "nilfs2" ]
to my system configuration to make it work.Expected behavior The filesystem type should be auto detected and the kernel module injected into the
initrd
without having to manually specify it.Metadata Please run
nix run nixpkgs.nix-info -c nix-info -m
and paste the result."x86_64-linux"
Linux 5.2.2, NixOS, 19.09pre186563.b5f5c97f7d6 (Loris)
yes
yes
nix-env (Nix) 2.2.2
"nixos-19.09pre186820.bf39fc17d46"
""
/nix/var/nix/profiles/per-user/root/channels/nixos