Raspbian + NFS

Install:

[cc lang=”bash”]
apt-get install nfs-kernel-server
[/cc]

Exports:

[cc lang=”bash”]
nano /etc/exports
[/cc]

Once there, let’s add:

[cc lang=”bash”]
/mnt/flash *(rw,sync)
[/cc]

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:

[cc lang=”bash”]
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 [/cc] [cc lang="bash"] 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 [/cc] Source Here!

%d