Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
MacLemon
MacLemon
@MacLemon@chaos.social  ·  activity timestamp 4 weeks ago

Been fighting Debian #Trixie 13 for two days now. It seems to be impossible to auto mount an NFS4 share at boot. Manually it works fine.

Not even with `ro,auto,sync,default,hard,noatime,retrans=15,x-systemd.after=network-online.target,x-systemd.automount,x-systemd.requires=network-online.target,_netdev,clientaddr=
192.0.2.13` in `fstab`.

This used to work in Debian #Bookworm 12, Ubuntu jammy (22) and noble (24).

Next attempt: `autofs` or directly in OCI container

  • Copy link
  • Flag this post
  • Block
MacLemon
MacLemon
@MacLemon@chaos.social replied  ·  activity timestamp 3 weeks ago

Changed my strategy, due to a race condition between systemd mounting #NFS and #docker creating bind volumes.

Trying to mount NFS directly from within a container defined as a volume. Works when deployed with #ansible, but only during runtime. At boot, the container is started before the NFS volume is ready causing the container to fail starting.

This issue is 100% reproducible and can be found online everywhere going back for years. No solution to be found.
#WTF

  • Copy link
  • Flag this comment
  • Block
MacLemon
MacLemon
@MacLemon@chaos.social replied  ·  activity timestamp 3 weeks ago

Further testing shows… that I’m fully aware that people will NOT LIKE this and will shoot the messenger… please be kind. I don’t like it either, but I can reproduce this 100%.

Replace Debian Trixie with Ubuntu 24.04 LTS Server minimal installation and run the identical playbook against that VM and everything *instantly* works. Reproducibly. Across reboots. Every time.

While I don’t fancy that solution, I’ll take the path of least resistance here and use Ubuntu here.

  • Copy link
  • Flag this comment
  • Block
Johannes Kastl
Johannes Kastl
@johanneskastl@digitalcourage.social replied  ·  activity timestamp 3 weeks ago

@MacLemon This is why Podman focussed on systemd integration. Quadlets are just regular systems services and wait/require other systems things...

  • Copy link
  • Flag this comment
  • Block
Franziska
Franziska
@kunsi@chaos.social replied  ·  activity timestamp 4 weeks ago

@MacLemon Does systemd even create the correct `.mount` files?

If yes, you should be able to use the journal to tell why it doesn't want to mount (just give it the unit name)

If not, you could try to generate the ,mount and .automount files manually: https://git.franzi.business/kunsi/bundlewrap/src/branch/main/bundles/nfs-client/files

  • Copy link
  • Flag this comment
  • Block
MacLemon
MacLemon
@MacLemon@chaos.social replied  ·  activity timestamp 3 weeks ago

@kunsi Thanks for getting back to me! Much appreciated. Yes, the corresponding `.mount` and `.automount` files *do* get created. Turns out, this is a race condition between systemd trying to mount NFS and docker daemon, creating the local bind mounts.
At boot time systemd refuses to mount NFS over a non-empty directory. (makes sense) Manually mounting later, work. (kinda inconsistent behaviour.)

I’ve changed my strategy, since I’m not getting anywhere with this.

  • Copy link
  • Flag this comment
  • Block
o/1MS\o ⌨️🐧 | #WeAreNatenom
o/1MS\o ⌨️🐧 | #WeAreNatenom
@db_geek@norden.social replied  ·  activity timestamp 3 weeks ago

@MacLemon @kunsi

Just an idea: did you tried a drop-in configuration for dockerd with additionally "After=" and "RequiresMountsFor=" pointing to the NFS mounts?

https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.40 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct