Monday, May 28, 2012

NFS Server configuration Centos 6 And RHEL 6

Network File System (NFS)

Network File System (NFS) is a network file system protocol originally developed by Sun Micro systems. It allows your users or client compute to access files over a network. Linux and UNIX like operating systems (including MS-Windows) can mount file system over a network and work as they are mounted locally. This is perfect for sharing files or centralized home directories.

NFS version 4 provides the following benefits over NFSv3 or earlier NFS versions:

  1  Performance improvements
  2  Mandates security and ACL
  3  NFS v4 by default works over TCP s
  4  Easy to setup firewall option
  5  And much more.

Required Packages

nfs-utils - The nfs-utils package provides a daemon for the kernel NFS server and related tools, which provides a much higher level of performance than the traditional Linux NFS server used by most users.

Install NFS Server

[root@server Desktop]# yum install nfs*

[root@server Desktop]# mksdir /data

[root@server Desktop]# chmod 777 /data

Share File System

[root@server Desktop]# vim /etc/exports

/data   *(rw,sync)

save :wq!

Start NFS services

[root@server Desktop]#service nfs restart
Sample outputs:

Starting NFS services:                                [  OK  ]
Starting NFS quotas:                                  [  OK  ]
Starting NFS daemon:                                  [  OK  ]
Starting NFS mountd:                                  [  OK  ]

Turn on services

[root@server Desktop]#chkconfig nfs on

To Show Mount

[root@server Desktop]# showmount -e 10.90.12.1
Export list for 10.90.12.1:
/data *
       

Client End

To Show Mount
[root@server Desktop]# showmount -e 10.90.12.1
Export list for 10.90.12.1:
/data *
To Mount Share File
[root@server1 ~]# mount 10.90.12.1:/data /mnt

[root@server1 ~]# ls /mnt/
abc  bnd  yt
[root@server1 ~]# touch /mnt/abc


[root@server1 ~]# umount /mnt

3 comments: