Thursday, March 26, 2015

Nice NFS setup page

NFS server

To check the NFS server is not installed, you can do...
  • $ dpkg -l | grep nfs-kernel-server
Install the required packages...

# apt-get install nfs-kernel-server

NFSv4 client

Install the required packages...
  • # apt-get install nfs-common 
On the client we can mount the complete export tree with one command:
  • # mount -t nfs -o proto=tcp,port=2049 nfs-server:/ /mnt
    Note that nfs-server:/export is not necessary in NFSv4, as it is in NFSv3. The root export :/ defaults to export with fsid=0.
We can also mount an exported subtree with:
  • # mount -t nfs -o proto=tcp,port=2049 nfs-server:/users /home/users
To save us from retyping this after every reboot we add the following line to /etc/fstab:

nfs-server:/   /mnt   nfs    auto  0  0
It may be required to force rpcbind to start.
this is accomplished by:
update-rc.d enable rpcbind
/etc/init.d/rpdbind start
The latter starts it for the current boot incarnation.  The update-rc.d makes it be
started on all subsequent boots till it is explicitly disabled.

No comments:

Post a Comment