Raspbian + NFS

Install:


apt-get install nfs-kernel-server
nano /etc/exports

Once there, let’s add:


/mnt/flash *(rw,sync)

Dont’ forget to run exportfs!

Add New Services:

Here’s the deal: rpcbind must run before nfs-server. But due to a bug… that’s not the case. What happens if the sequence is not that?… simple! NFS is inaccessible.

In order to fix this, let’s do the following:


cat >/etc/systemd/system/nfs-common.service <<\EOF
[Unit]
Description=NFS Common daemons
Wants=remote-fs-pre.target
DefaultDependencies=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/etc/init.d/nfs-common start
ExecStop=/etc/init.d/nfs-common stop

[Install]
WantedBy=sysinit.target
EOF

cat >/etc/systemd/system/rpcbind.service <<\EOF
[Unit]
Description=RPC bind portmap service
After=systemd-tmpfiles-setup.service
Wants=remote-fs-pre.target
Before=remote-fs-pre.target
DefaultDependencies=no

[Service]
ExecStart=/sbin/rpcbind -f -w
KillMode=process
Restart=on-failure

[Install]
WantedBy=sysinit.target
Alias=portmap
EOF

Source Here!