0

I want to mount a samba share from my NAS on /mnt/Media on boot via cifs. I already added an entry to /etc/fstab (incl. _netdev option).

The connection to the NAS is a separate point to point connection (DAC for 10Gbit) besides my normal LAN. Unfortunately the _netdev option mounts the share when the LAN is up but while the connection to the NAS is still down.

Is there a way to specify a specific interface (in my case: enp12s0) to wait for in /etc/fstab before mounting?

Environment:

Ubuntu 18.04 LTS with 4.19.2 kernel

1 Answer 1

0

There is no such option in /etc/fstab - the fstab-mechanism is quite old.

I have this exact situation very often (video industry mounting from ptp-nets) and always solve it via /etc/rc.local along the lines of

while true; do
  ping -c 1 -I /dev/enp12s0 ip.of.nas.nic >/dev/null 2>&1
  test "$?" == "0" && break
  sleep 0.5
done
mount -t cifs ... 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .