Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tools:nfs [2015/01/10 22:32]
darron [Void Linux client]
tools:nfs [2017/01/11 16:33] (current)
darron [autofs]
Line 1: Line 1:
 ==== NFS ==== ==== NFS ====
 +
 +Network file system allows us to share files over the network.
  
 === Debian server === === Debian server ===
Line 23: Line 25:
 </code> </code>
  
-=== Raspbian client ===+=== Debian client ===
 <code> <code>
 apt-get install rpcbind nfs-common apt-get install rpcbind nfs-common
Line 41: Line 43:
 echo "$SERVERADDRESS:/embedded /embedded nfs rw,noatime,noauto 0 0" >> /etc/fstab echo "$SERVERADDRESS:/embedded /embedded nfs rw,noatime,noauto 0 0" >> /etc/fstab
 echo "rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults 0 0" >> /etc/fstab echo "rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults 0 0" >> /etc/fstab
-mkdir -p /var/service/rpcbind + 
-echo "#\!/bin/sh\nexec rpcbind -f" > /var/service/rpcbind/run +mkdir -p /etc/sv/rpcbind 
-chmod +x /var/service/rpcbind/run +echo "#\!/bin/sh\nexec rpcbind -f" > /etc/sv/rpcbind/run 
-mkdir -/var/service/rpc.idmapd +chmod +x /etc/sv/rpcbind/run 
-echo "#\!/bin/sh\nexec rpc.idmapd -f" >> /var/service/rpc.idmapd/run +ln -s /etc/sv/rpcbind /var/service 
-chmod +x /var/service/rpc.idmapd/run+ 
 +mkdir -p /etc/sv/rpc.idmapd 
 +echo "#\!/bin/sh\nexec rpc.idmapd -f" >> /etc/sv/rpc.idmapd/run 
 +chmod +x /etc/sv/rpc.idmapd/run 
 +ln -s /etc/sv/rpc.idmapd /var/service 
 mount rpc_pipefs mount rpc_pipefs
 mount $SERVERADDRESS:/embedded mount $SERVERADDRESS:/embedded
 </code> </code>
 +
 +=== Debian autofs ===
 +
 +One you have an NFS client working you can remove the entry in fstab and use autofs to mount it instead.
 +
 +<code>
 +apt-get install autofs
 +echo "/- /etc/auto.data" >> /etc/auto.master
 +echo "/embedded -fstype=nfs $SERVERADDRESS:/embedded" >> /etc/auto.data
 +/etc/init.d/autofs restart
 +</code>
 +