NFS/Client
Contents |
[edit] Kernel Configuration
Enter the "make menuconfig" configuration screen and enable the following options:
| Linux Kernel Configuration: NFS Client Support (2.6.27) |
File Systems --->
[*] Network File Systems --->
<*> NFS client support
[*] NFS client support for NFS version 3
[ ] NFS client support for the NFSv3 ACL protocol extension
[ ] NFS client support for NFS version 4 (EXPERIMENTAL)
|
Most systems are currently using NFS version 3. NFS version 4 support is optional, but shouldn't cause you any issues. If you opt to build NFS client support as a module, it will be called nfs.
[edit] Userspace Utilities
Once your kernel has updated (if needed) and you've booted into it, install the userspace utilities with:[edit]
As root, mount the NFS share using the following command, where HOSTNAME is replaced with the IP address or hostname of the NFS server, /path/to/sharedDirectory is the directory to be mounted and /mnt/target is replaced with the location you want the share mounted. Make sure portmap (for nfs-utils < 1.2.x) or rpcbind (for nfs-utils >= 1.2.x) is started on the client machine.
For nfs-utils < 1.2.x:
For nfs-utils >= 1.2.x:
Now, we can mount the share itself:
For NFSv4, replace nfs with nfs4.
[edit] Fstab Entries
If you want users to be able to mount the share, or just for convenience, you can add an entry to /etc/fstab,
192.168.0.30:/mnt/music /home/user/mnt/music nfs defaults,user,noauto 0 0
or use a hostname from your /etc/hosts file.
mediaserver:/mnt/video /home/user/mnt/video nfs defaults,user,noauto 0 0