Sunday, June 4, 2017

Solaris 10 - working with nfs server and client

Nfs share

1. Create the directory you want to share
# mkdir /data/mydb/test/myshare

2. Share your directory
# share -F nfs /data/mydb/test/myshare
# share
-               /data/mydb/test/myshare   rw   ""


Now, go to the client and mount


On client system
1. Check if your system has access to the share

# showmount -e 192.168.10.21
export list for 192.168.10.21:
/data/mydb/test/myshare (everyone)

2. Mount the share
# mount 192.168.10.21:/data/mydb/test/myshare /mnt

3. Verify the share
# df -h /mnt
Filesystem             size   used  avail capacity  Mounted on
192.168.10.21:/data/mydb/test/myshare  872M   453M   419M    52%    /mnt
#


Now on your server, check what/which clients are using your share.
# cat /etc/rmtab
# cat /etc/rm
rmmount.conf  rmt           rmtab
# cat /etc/rmtab
# cat /etc/rmtab
# cat /etc/rmtab
# vi /etc/dfs/dfstab
"/etc/dfs/dfstab" 12 lines, 397 characters

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command 'svcadm enable network/nfs/server' to
#       run the NFS daemon processes and the share commands, after adding
"/etc/dfs/dfstab" 12 lines, 397 characters
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
share -F nfs /data/mydb/test/myshare
~
~
~
"/etc/dfs/dfstab" 12 lines, 433 characters
# share
-               /data/mydb/test/myshare   rw   ""
# shareall
# share
-               /data/mydb/test/myshare   rw   ""
#

No comments:

Post a Comment