[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
howtos:network_services:nfs-quick_and_dirty_setup [2014/01/20 23:07 (UTC)] – created ! arfonhowtos:network_services:nfs-quick_and_dirty_setup [2014/01/22 04:48 (UTC)] – Just learned about the <file> tag... had to add arfon
Line 1: Line 1:
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
 +====== NFS - Quick and Dirty Setup ======
 +
 Known to work on Slackware 14 & 14.1 \\  Known to work on Slackware 14 & 14.1 \\ 
  
Line 17: Line 19:
 <code>vi /etc/exports</code> <code>vi /etc/exports</code>
 add: \\  add: \\ 
-<code>/nfs_share 192.168.1.1/24(rw,sync,no_subtree_check)</code>+<file sh /etc/exports>/nfs_share 192.168.1.1/24(rw,sync,no_subtree_check)</file>
  
 Start the NFS and RPC daemons \\  Start the NFS and RPC daemons \\ 
Line 23: Line 25:
 chmod 755 /etc/rc.d/rc.rpc chmod 755 /etc/rc.d/rc.rpc
 /etc/rc.d/rc.nfsd start /etc/rc.d/rc.nfsd start
-/etc/rc.d/rpc start</code>+/etc/rc.d/rc.rpc start</code>
  
 Export the shares \\ Export the shares \\
Line 34: Line 36:
 Create the mount point \\  Create the mount point \\ 
 <code>mkdir /mnt/nfs_share</code> <code>mkdir /mnt/nfs_share</code>
 +Start the RPC daemon \\ 
 +<code>chmod 755 /etc/rc.d/rc.rpc
 +/etc/rc.d/rc.rpc start</code>
  
  
Line 46: Line 51:
 <code> vi /etc/fstab</code> <code> vi /etc/fstab</code>
 add: \\  add: \\ 
-<code>my.nfs.server:/nfs_share /mnt/nfs_share nfs rw,defaults 0 0</code>+<file sh /etc/fstab>my.nfs.server:/nfs_share /mnt/nfs_share nfs rw,defaults 0 0</file>
  
 **SEMI-AUTO-MOUNT** \\  **SEMI-AUTO-MOUNT** \\ 
Line 52: Line 57:
 <code> vi /etc/fstab</code> <code> vi /etc/fstab</code>
 add: \\  add: \\ 
-<code>my.nfs.server:/nfs_share /mnt/nfs_share nfs rw,noauto 0 0</code>+<file sh /etc/fstab>my.nfs.server:/nfs_share /mnt/nfs_share nfs rw,noauto 0 0</file>
 then when you want to mount, just run: \\  then when you want to mount, just run: \\ 
 <code>mount /mnt/nfs_share</code> <code>mount /mnt/nfs_share</code>
Line 72: Line 77:
 **CLIENT:** \\  **CLIENT:** \\ 
 <code>mkdir /mnt/nfs_share <code>mkdir /mnt/nfs_share
 +chmod 755 /etc/rc.d/rc.rpc
 +/etc/rc.d/rc.rpc start
 echo "YOUR_NFS_SERVER:/SHARED_DIR /CLIENT_MOUNT_POINT nfs rw,defaults 0 0" >> /etc/fstab echo "YOUR_NFS_SERVER:/SHARED_DIR /CLIENT_MOUNT_POINT nfs rw,defaults 0 0" >> /etc/fstab
 mount /CLIENT_MOUNT_POINT mount /CLIENT_MOUNT_POINT
Line 79: Line 86:
  
 PROBLEM: NFS shares won't mount on client box with a "Stale NFS file handle" error.\\  PROBLEM: NFS shares won't mount on client box with a "Stale NFS file handle" error.\\ 
-SOLUTION: +SOLUTION: \\  
-     1) Forcibly unmount the directory on the CLIENT machine (if mounted): <code>umount -f /mnt/nfs_share</code> +1) Forcibly unmount the directory on the CLIENT machine (if mounted): 
-     2) Flush the NFS registry on the SERVER machine: <code>exportfs -f</code> +<code>umount -f /mnt/nfs_share</code> 
-     3) Remount the NFS share+2) Flush the NFS registry on the SERVER machine: 
 +<code>exportfs -f</code> 
 +3) Remount the NFS share
  
  
 howtos:network_services:nfs-quick_and_dirty_setup ()