Comments on Setting Up An NFS Server And Client On CentOS 5.5

Setting Up An NFS Server And Client On CentOS 5.5 This guide explains how to set up an NFS server and an NFS client on CentOS 5.5. NFS stands for Network File System; through NFS, a client can access (read, write) a remote share on an NFS server as if it was on the local hard disk.

3 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Robert P. J. Day

I've asked this question elsewhere -- can you configure NFS on both the client and server side to use *nothing* but NFSv4 and no earlier versions? If you examine the NFS init script /etc/init.d/nfs, you can see that the mountd invocation accepts options "--no-nfs-version 1", "--no-nfs-version 2" and so on. Can you explicitly deactivate support for all NFS versions other than 4?

By: Phill

I had to tweak the suggested line to get my MacBook OS 10.6.6 to mount the exported folder.  The settings below are as 'relaxed' as I could get it so it could do with more testing to see how much tighter the security can be while still working.

I think the /24 (subnet size) may be importnt in any case though.

/mnt/2T/  192.168.7.0/24(rw,sync,no_subtree_check,insecure,all_squash,anonuid=1001,anongid=1001)

By: Joost Ringoot

Nice but:

 If rpcbind is not running, and it isn't on a centos 6 minimal install.

You get these kind of errors:

[root@myhost ]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS mountd:                                       [FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd
                                                           [FAILED]
[root@myhost ]# 

 [root@myhost ]# /etc/init.d/rpcbind start
Starting rpcbind:                                          [  OK  ]
[root@myhost ]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
[root@myhost ]#

make it permanent with 

# chkconfig --level 35 rpcbind on