Home | News | Download | Packages | Forum | Wiki | Github

Nfs mount after network is up

(Holger Wagemann) #1


I’ve a problem with bringing up my nfs shares on a fresh installed void.

The system is an old ThinkPad R500, I want to use as HTPC with kodi.

Wlan is deactivated by bios, I only use cabled lan.

In my /etc/fstab I’ve the following entry:
wdnas.unix.pc://daten/nutzer/share/htpc /wdnas nfs rw,_netdev 0 0

But _netdev does not help, I can mount nfs share after starting lxqt with mount -a but it would be nice to bring nfs shares up during boot.

Changing dhcp to static is no option. All machines in local network get mac related IP by dhcp server in my avm fritzbox, our FreeBSD server, our FreeBSD Desktop systems and also debian based Server for Multimedia stuff wdnas.

Yes, a manual mount -a after starting system is a possibility for me, but when my wife starts HTPC system it just should be ready-to-use. :smiley:

This is not a problem because of a systemfree-os: On same machine a FreeBSD starts nfs aftter bringing up network.

Any hints?

Apart from that Void is a nice distribution, I also want to replace systemd based Debian on our printserver by Void Linux.

Kind regards,


The reason is that runit explicitly doesn’t mount network shares at boot. I remember a similar problem here: Nfs shares won't mount at boot. The difference is that you use cabled lan. So it should work when you put your mount command in /etc/rc.local.

(oliver) #3

is it worth trying the ‘hard,intr’ options alongside _netdev in fstab?

  • hard or soft — Specifies whether the program using a file via an NFS connection should stop and wait (hard) for the server to come back online, if the host serving the exported file system is unavailable, or if it should report an error (soft).

  • If hard is specified, the user cannot terminate the process waiting for the NFS communication to resume unless the intr option is also specified.

  • intr — Allows NFS requests to be interrupted if the server goes down or cannot be reached.

(Holger Wagemann) #4


thanks for your hint. This evening I’ll try to mount nfs per command line in /etc/rc.local and will give feedback.

Kind regards,

(Holger Wagemann) #5


I’ve find out, that the old intel graphic chip in TP R500 is not able to handle our TV resolution in a correct way (TV is connected by displayport), and now I use a Fujitsu Notebook, but with FreeBSD.

But I don’t give up Voidlinux on old ThinkPad, I’ve installed a full plasma5 on this machine (by the way I’ve learned to configure Wlan with help of excellent Void wiki).

And now the situation has changed, now it is good, that runit does not mount nfs shares during boot procedure.

Apart from that, I’ve tried nfs mount with command line in /etc/local.rc but without success.

Kind regards,

(Masato the Empty) #6

If you need to wait for dhcp, then rc.local won’t work IIRC (it runs before any services, including dhcpcd). You’ll need the nfs mount to occur after the dhcpcd service has done its thing.

I prefer dhcp myself on my network, and statically assign certain clients as you do. But having the dhcp client started as a later service does present some challenges that you’ll need to get used to.

How about writing a script that will wait for the nfs server to become available before mounting the shares, and adding that to rc.local and backgrounding it (i.e. “nfs_script &”)? With that script backgrounded, the rest of startup can proceed while your nfs script waits patiently to finish its thing.


Sorry, I forgot about the dhcp part.