My diskless laboratory computers do not shutdown properly because
systemd probably do not handle properly manual NFS mounts in
initramfs. I'll describe shortly what is happening:
- I created
initramfsin which I mount
roseveral NFS shares (whole
/, profiles, etc.) and overlay them using
rwDebian diskless for each workstation.
- Then I
switch_rootto this overlayed system and it boots perfectly fine and works without problems. Homes are mounted separately during the boot based on
- In my system I disabled Network Manager completely to prevent users from fiddling with network. This would be very harmful to them :)
- When I'm doing shutdown system hangs with the
nfs: server not responding, still trying...(this happens also with NM enabled, but in this case sometimes the shutdown succedes, but it is indeterministic).
So, my manual mount are "hidden" somehow from the
systemd (I suspect that). My
none / overlay defaults,x-systemd.requires=network-online.target 0 0 X.X.X.X:/home /home nfs rw,nodev,nosuid,hard,nolock,proto=tcp,nfsvers=3,sec=krb5,x-systemd.requires=network-online.target 0 0
x-systemd.requires... but nothing helps.
Is there a solution for this? How can I umount all NFS shares under the overlayed
/ or at least forcibly reboot the system after
/home is umounted properly? (system is diskless and all changes are in
overlayfs, so it is safe to just, for example
echo b > /proc/sysrq-trigger) ;)