Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 21 December 2010

How to install and configure NFSv4 server and client on linux machine?

Posted on 04:03 by Unknown
Guys,

I referred the following steps :

NFS server configure for NFSv4 :

How NFS Works?

NFS consists of at least two main parts: a server and one or more clients. The client remotely accesses the data that is stored on the server machine. In order for this to function properly a few processes have to be configured and running.

The server has to be running the following daemons:

Daemon Description :

nfsd The NFS daemon which services requests from the NFS clients.
mountd The NFS mount daemon which carries out the requests that nfsd(8) passes on to it.
rpcbind This daemon allows NFS clients to discover which port the NFS server is using.

The client can also run a daemon, known as nfsiod. The nfsiod daemon services the requests from the NFS server. This is optional, and improves performance, but is not required for normal and correct operation. See the nfsiod(8)[man 8 nfs] manual page for more information.

Note : I have done it on NFS server RHEL5.x64 and NFS client RHEL6.x64.

NFS server configuration for nfs4 :


[root@vm12 alltestfiles]#yum install nfs-utils nfs4-acl-tools portmap

[root@vm12 alltestfiles]# cat /etc/exports
/var/nfs4testing/ 10.65.211.15(rw,sync,fsid=0) //Share File System /var/nfs4testing
[root@vm12 alltestfiles]#

ps : fsid is very important here.

[root@vm12 alltestfiles]# chkconfig nfs on
[root@vm12 alltestfiles]# chkconfig portmap on
[root@vm12 alltestfiles]# chkconfig --list | grep nfs
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@vm12 alltestfiles]# chkconfig --list | grep portmap
portmap 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@vm12 alltestfiles]#

[root@vm12 alltestfiles]# vi /etc/sysconfig/iptables
[root@vm12 alltestfiles]# cat /etc/sysconfig/iptables | grep 10.65.211
-A RH-Firewall-1-INPUT -s 10.65.211.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEP
[root@vm12 alltestfiles]#

[root@vm12 alltestfiles]# vi /etc/hosts.deny
[root@vm12 alltestfiles]# vi /etc/hosts.allow
[root@vm12 alltestfiles]# cat /etc/hosts.deny | grep portmap
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
portmap:ALL
[root@vm12 alltestfiles]# cat /etc/hosts.allow| grep 10.65.211
portmap:10.65.211.0/24
portmap:10.65.192.0/24
[root@vm12 alltestfiles]#

Verify :
[root@vm12 alltestfiles]# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 896 status
100024 1 tcp 899 status
100011 1 udp 1000 rquotad
100011 2 udp 1000 rquotad
100011 1 tcp 1003 rquotad
100011 2 tcp 1003 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 60156 nlockmgr
100021 3 udp 60156 nlockmgr
100021 4 udp 60156 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 51539 nlockmgr
100021 3 tcp 51539 nlockmgr
100021 4 tcp 51539 nlockmgr
100005 1 udp 603 mountd
100005 1 tcp 606 mountd
100005 2 udp 603 mountd
100005 2 tcp 606 mountd
100005 3 udp 603 mountd
100005 3 tcp 606 mountd
[root@vm12 alltestfiles]#

or nfsstat

NFS client configure for NFSv4 : -

yum install nfs-utils

[root@kmaiti ~]# hostname -i
10.65.192.160 127.0.0.1
[root@kmaiti ~]#
[root@kmaiti ~]# cat /etc/sysconfig/iptables | grep 2049
#-A RH-Firewall-1-INPUT -s 10.65.192.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT

[root@kmaiti ~]# mount -t nfs 10.65.211.12:/ /mounted/


[root@kmaiti ~]# df -HT | column -t
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/HelpDeskRHEL6-Root
ext4 16G 5.3G 9.5G 36% /
tmpfs tmpfs 2.0G 455k 2.0G 1% /dev/shm
/dev/mapper/HelpDeskRHEL6-NotBackedUp
ext4 8.5G 154M 7.9G 2% /NotBackedUp
/dev/mapper/HelpDeskRHEL6-VirtualMachines
ext4 21G 181M 20G 1% /VirtualMachines
/dev/sda1 ext4 204M 47M 147M 25% /boot
/dev/mapper/HelpDeskRHEL6-Home
ext4 4.3G 263M 3.8G 7% /home
10.65.211.12:/
nfs4 8.3G 1.6G 6.3G 20% /mounted
[root@kmaiti ~]#


[root@kmaiti ~]# cat /etc/fstab | grep mounted
10.65.211.12:/ /mounted nfs4 soft,intr,rsize=8192,wsize=8192,nosuid 0 0
[root@kmaiti ~]#

try :
)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • Details about NFS timeout on Red Hat Enterprise Linux 5
    There are two mount options for timeouts of an NFS request. # timeo: a timeout value. the unit is 1/10 seconds. # retran...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • How to configure NFSv4 with kerberos on linux?
    Guys, Please refer the following steps to do the same : Used Environment : kerberos(i.e NFSv4) server : RHEL 5.5, 64 bit arch NFS client : R...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...
  • What is "WCHAN" attribute at "ps -alwww" on linux ?
    WCHAN : Name of the kernel function in which the process is sleeping, a "-" if the process is running, or a "*" if the p...
  • Steps to develop patch and apply it to original source file
    1. Create test.c  Above file contains : -------- [kamalma@test-1 C_Programming]$ cat test.c #include #include int main()  {  printf("\n...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ▼  December (9)
      • unable connect to socket: No route to host (113)
      • How to install frysk on linux rhel5?
      • Flow diagram of systemtap debugging scripting tool?
      • How to remotely access the linux desktop from any ...
      • How to install luci and ricci for managing the clu...
      • How to configure a High Availability Cluster (Hear...
      • How to configure autofs with NFS4?
      • How to install and configure NFSv4 server and clie...
      • Which desktop is used by my linux machine?
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.