Guidelines

This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

0 votes
352 views
352 views

After upgrading my desktop system from Devuan Ascii to Beowulf the system no longer mounts NFS filesystems at boot time. When I manually mount the fstab entries after the system finished booting everything works just fine. The mount option _netdev is set, but doesn't seem to have an effect (the behavior doesn't change whether it's present or not).

I did some research and saw the mount option x-systemd.automount being mentioned, so I tried adding that, but that also didn't change the behavior (and I would've been very surprised if it had).

in Sysadmin
by (100)
1 13 28
edit history

Please log in or register to answer this question.

1 Answer

0 votes
 

At least on Beowulf (I didn't check for older releases) network filesystems are apparently mounted via /etc/network/if-up.d/mountnfs. For debugging I added a set -x and redirected the script output to a log file. After taking the network interface down and back up, I found a curious error message in the debug log:

42: /etc/init.d/rpcbind: stat: not found

mountnfs does attempt to start both portmap and rpcbind, and line 42 in the rpcbind init script simply checks owner, permissions and filetype of the service's state directory (/run/rpcbind):

if [ "$(LC_ALL=C stat -c '%U %g %a %F' "$STATEDIR")" != "_rpc 0 755 directory" ] ; then

which should work (and did so when I manually ran the command). However, the command is called without a path, and it's not a shell builtin, but a binary located in /usr/bin. Which reeks of a PATH issue. And sure enough, when I changed the command to full path, everything started working again:

if [ "$(LC_ALL=C /usr/bin/stat -c '%U %g %a %F' "$STATEDIR")" != "_rpc 0 755 directory" ] ; then

The root cause of the issue seems to be that /etc/network/if-up.d/mountnfs sets PATH=/sbin:/bin, while /etc/init.d/rpcbind apparently expects a less restrictive PATH, but doesn't bother ensuring that.

by (100)
1 13 28
edit history
...