Monday, August 25, 2008

NFS Installation

The NFS server service is dependent on a slew of other services.
Manually enabling all of these services would be tedious.
The svcadm command makes this simple with one command:

svcadm -v enable -r network/nfs/server


The first step is to edit the /etc/dfs/dfstab file. We just added this entry:

share -F nfs -o rw=srv-1 -d "share" /share

# Edit the /etc/dfs/dfstab file on the server.
share [-F nfs] [-o specific-options] [-d description] pathname

share -F nfs -o ro,rw=homedog:chester /usr/src
read-only access is assigned to any client except homedog and chester, who have read/write access

share -F nfs -o rw=engineering,ro=homedog /usr/src
read/write is assigned to any client in the engineering netgroup. The client homedog has read-only access

#shareall

the share command writes information about all shared file resources to the /etc/dfs/sharetab file
#cat /etc/dfs/sharetab



#dfshares

Run the server script /etc/init.d/nfs.server stop.

Run the server script /etc/init.d/nfs.server start

server:/disk - /mount_point nfs - yes rw,soft



Start the server:

# /etc/init.d/nfs.server start


On the client side:
#dfsshares nfsserver

root@srv-1 u-1 # mount -t nfs srv-50:/share /share2


fstab on the client:

srv-50:/share /share2 nfs defaults 0 0


http://docs.sun.com/app/docs/doc/801-6634/6i10efskb?a=view

No comments: