====== NFS Network File System Howto ====== ===== General Steps ===== - Install nfs packages - Alter /etc/exports - Restart nfs server - Mount on client ===== Server Commands ===== * Install nfs packages for Ubuntu/debian * sudo apt-get install nfs-kernel-server nfs-common portmap * Following install statements may be important: * Creating config file /etc/idmapd.conf with new version Creating config file /etc/default/nfs-common with new version Adding system user `statd' (UID 112) ... Adding new user `statd' (UID 112) with group `nogroup' ... ... Creating config file /etc/exports with new version Creating config file /etc/default/nfs-kernel-server with new version * Add something like the following to /etc/exports . See [[http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS#Modify_EXPORTS|here]] for more details * rw - read write access * async - double checks file writes, faster, riskier (can corrupt easier) * no_subtree_check - do not invoke subtree algorithm which verifies that a file that is requested from the client is in the appropriate part of the volume. * # raid5 lms (linux media server) share /media/documents 192.168.1.0/255.255.255.0(rw,async,no_subtree_check) * Restart the nfs server * sudo /etc/init.d/nfs-kernel-server restart * Update nfs file share lists * sudo exportfs -a * Version and other info of running nfs's * nfsstat ===== Mac OS X ===== ==== Finder ==== * Ctrl+K * nfs://server.name/path/of/share ==== Command Prompt ==== * mount -o -P lms:/media/documents /Volumes/lms ==== Directory Utility ==== A built-in utility to OS X after Leopard that can keep track of mounts via a nice GUI. * See http://zawaarudo.blogspot.com/2008/06/directory-utility-and-remote-nfs-mounts.html * **Automount** Deprecated now that Directory Utility above does the same... easier ==== Bonjour ==== * See See http://ubuntuforums.org/showthread.php?p=4387032#post4387032 for some details ===== Linux ===== ==== Command Prompt ==== * mount master.foo.com:/home /mnt/home ==== /etc/fstab file ==== * # device mountpoint fs-type options dump fsckorder ... master.foo.com:/home /mnt nfs rw 0 0 ... ===== Cavaets ===== * Syntax errors in /etc/exports * options not correct in exports file * uid / gid not matching on client and server * little windows support See this doc: http://www.troubleshooters.com/linux/nfs.htm