Monday, January 11, 2010

To implement NFSv2,NFSv3 and NFSv4

NFSv2, NFSv3與NFSv4在Linux 2.6.x的kernel上,預設都是有支援的,不同的是需要對於server或client之前下達不同的參數以區別,以下分別就不同版本的實作簡單敘述:

1. NFS v3:
Server: exportfs *:/tmp
Client: mount 192.168.0.254:/tmp /mnt/nfs

2. NFS v2:
Server: exportfs *:/tmp
Client: mount -o nfsvers=2 192.168.0.254:/tmp /mnt/nfs

3. NFS v4:
Server: exportfs -o fsid=o *:/tmp
Client: mount -t nfs4 192.168.0.254:/tmp /mnt/nfs
References:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-nfs-client-config.html
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-nfs.html

No comments: