3

I'm trying to configure my RPi to use autofs to mount at boot a NFS share from my QNAP NAS.

The manual mount with

mount -v -t nfs server://share /mnt/share

works and also the autofs service works if I manually start it with

sudo service autofs start

after starting also rpcbind and nfs-common services first.

Now I want that all the 3 services involved (rpcbind, nfs-common and autofs) start automatically at boot.

Since Raspbian Jessie uses systemd, what should I do to add to the boot the rpcbind and nfs-common services, that should start before autofs?

Should I use init.d and so

sudo update-rc.d rpcbind enable

sudo update-rc.d nfs-common enable

or do I have to create a systemd unit file?

Cheshire Cat
  • 203
  • 3
  • 9

1 Answers1

1

I upgraded from Wheezy to Jessie and found that nfs wasn't mounting anymore.

I use mounting by editing fstab directly. This might not be an exact answer to your question, but it might fix your issue.

I've added the bold text to my existing mount entry.

192.168.123.123:/mnt/ext/some/dir /home/pi/for/example nfs4 _netdev,noauto,x-systemd.automount 0 0

This should make your disk mount at boot time.

Havnar
  • 1,617
  • 2
  • 16
  • 34