Tuesday, June 24, 2014

SHARE FOLDER REMOTELY IN SOLARIS

bash-3.2#
bash-3.2# mkdir db_exp_backup
bash-3.2#
bash-3.2#
bash-3.2# chmod -R 777 /opt/db_exp_backup/
bash-3.2#
bash-3.2#
bash-3.2# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0t0d0s0      7.9G   441M   7.4G     6%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    22G   996K    22G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/dev/dsk/c0t0d0s4      7.9G   3.3G   4.5G    43%    /usr
/usr/lib/libc/libc_hwcap1.so.1
                       7.9G   3.3G   4.5G    43%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/dsk/c0t0d0s3      7.9G   180M   7.6G     3%    /var
swap                    22G    64K    22G     1%    /tmp
swap                    22G    28K    22G     1%    /var/run
/dev/dsk/c0t0d0s5       90G    48G    42G    54%    /opt
bash-3.2# share
bash-3.2# 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
#       the very first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
share -F nfs -o rw,anon=0 /opt/db_exp_backup


bash-3.2# svcs -a |grep -i nfs
disabled       Feb_15   svc:/network/nfs/server:default
online         Feb_15   svc:/network/nfs/cbd:default
online         Feb_15   svc:/network/nfs/mapid:default
online         Feb_15   svc:/network/nfs/status:default
online         Feb_15   svc:/network/nfs/nlockmgr:default
online         Feb_15   svc:/network/nfs/client:default
online         Feb_15   svc:/network/nfs/rquota:default
bash-3.2# svcadm enable nfs/server
bash-3.2# svcs -a |grep -i nfs
online         Feb_15   svc:/network/nfs/cbd:default
online         Feb_15   svc:/network/nfs/mapid:default
online         Feb_15   svc:/network/nfs/status:default
online         Feb_15   svc:/network/nfs/nlockmgr:default
online         Feb_15   svc:/network/nfs/client:default
online         Feb_15   svc:/network/nfs/rquota:default
online         17:39:17 svc:/network/nfs/server:default
bash-3.2# share
-               /opt/db_exp_backup   rw,anon=0   ""
bash-3.2#
bash-3.2#




///////////////////////////////////check shared folder detail

bash-3.2# cat /etc/dfs/dfstab

#       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
#       the very first entry to this file.
#
#       share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2
share -F nfs -o rw,anon=0 /opt/db_exp_backup




///////////////////////On target server

bash-3.2# mkdir  db_exp_backup
bash-3.2# mount 10.1.1.130:/opt/db_exp_backup  /db_exp_backup


No comments:

Post a Comment