Quickly install NFSv4 in Ubuntu 12.04 LTS

IP Address example:

  • IP address of the NFS server: 192.168.0.1
  • IP address of the NFS client: 192.168.0.2

Folder for mounting:

  • On Server: /var/nfs
  • On Client: /mnt/nfs/var/nfs

On Server:

sudo apt-get install nfs-kernel-server portmap
mkdir /var/nfs
chown nobody:nogroup /var/nfs
sudo nano /etc/exports

# Add to last line:
/var/nfs 192.168.0.0(rw,sync,no_subtree_check)
exportfs -a

On Client:

sudo apt-get install nfs-common portmap
mkdir -p /mnt/nfs/var/nfs
mount 192.168.0.1:/var/nfs

To verify on Client:

df -h

To test the NFS Mount

ON CLIENT:

touch /mnt/nfs/var/nfs/example

ON SERVER:

ls /var/nfs

Removing the mount on client:

sudo umount /directory_name
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s