nfs share solaris

por | 2 abril, 2014

to share a filesystem

edit the /etc/dfs/dfstab and type in the following

share -F nfs -o rw=client mountpoint of shared filesystem

Note

rw means read write permission use the right permission that will serve your need. it could be
ro (read only).

share -F nfs -o ro=client mountpoint of shared filesystem
client is the client machine

mountpoint of shared filesystem is the mount point of where your intent share resource live
eg /export/home or /var/mail

finally
stop and start nfs daemon to make change take effect

you could stop and start nfs by issuing

/etc/init.d/nfs.server stop
followed by
/etc/init.d/nfs.server start

If your machine is already exporting filesystems, and you are adding a new one, you should simply run the shareall command to make this new filesystem available:

% shareall

 

make sure nfs daemon is start by issuing
ps -ef | grep nfs
this should show statd and lockd running.
the statd and lockd must be running on server and
client

 

and then on the client run the command

mount -F nfs server1:/mountpoint_folder /newfolder