分类:
2007-06-21 10:08:07
////////////////// Solaris 10 之前的配置 /////////////////
server端(1.1.6.68)
1) 修改 /etc/dfs/dfstab文件
# more /etc/dfs/dfstab
# Place share(1M) commands here for automatic execution
# on entering init state 3.
#
# Issue the command '/etc/init.d/nfs.server start' 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 "
# .e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2
share -F nfs -o rw=1.1.1.3 /tmp
2) 启动rpc进程(如果没启动)
# /etc/rc2.d/S71rpc start
3) 启动server nfs进程
# /etc/init.d/nfs.server start
4) 检查dfshares是否成功
# dfshares
RESOURCE SERVER ACCESS TRANSPORT
host:/tmp host -
client端(1.1.1.3)
启动client端 nfs进程
#/etc/init.d/nfs.client start
Mount
##mount 1.1.6.68:/tmp /nfs
# df -k
Filesystem kbytes used avail capacity Mounted on
-----------------------------------------------------------------
1.1.6.68:/tmp 2481656 220904 2260752 9% /nfs
成功。配置中我也遇到过问题,详细请大家看
配置nfs,在client端mount时报RPC: Rpcbind failure - RPC: Timed out
+++++++++++++++++++++ solaris 10 server端 +++++++++++++++
http://blogold.chinaunix.net/u1/36549/showart_304837.html
-a |grep nfs
disabled 10:42:11 svc:/network/nfs/server:default
online Jan_20 svc:/network/nfs/cbd:default
online Jan_20 svc:/network/nfs/mapid:default
online Jan_20 svc:/network/nfs/status:default
online Jan_20 svc:/network/nfs/nlockmgr:default
online Jan_20 svc:/network/nfs/client:default
online 15:12:58 svc:/network/nfs/rquota:default
-l nfs/server
fmri svc:/network/nfs/server:default
name NFS server
enabled false
state disabled
next_state none
state_time Fri Jan 21 10:42:11 2011
logfile /var/svc/log/network-nfs-server:default.log
restarter svc:/system/svc/restarter:default
contract_id
dependency require_any/error svc:/milestone/network (online)
dependency require_all/error svc:/network/nfs/nlockmgr (online)
dependency optional_all/error svc:/network/nfs/mapid (online)
dependency require_all/restart svc:/network/rpc/bind (online)
dependency optional_all/none svc:/network/rpc/keyserv (disabled)
dependency optional_all/none svc:/network/rpc/gss (online)
dependency require_all/error svc:/system/filesystem/local (online)
enable svc:/network/nfs/server
-a |grep nfs
disabled 10:43:35 svc:/network/nfs/server:default
online Jan_20 svc:/network/nfs/cbd:default
online Jan_20 svc:/network/nfs/mapid:default
online Jan_20 svc:/network/nfs/status:default
online Jan_20 svc:/network/nfs/nlockmgr:default
online Jan_20 svc:/network/nfs/client:default
online 15:12:58 svc:/network/nfs/rquota:default
/etc/dfs
-rlt
total 4
-rw-r--r-- 1 root root 68 Aug 25 2008 fstypes
-rw-r--r-- 1 root sys 397 Aug 25 2008 dfstab
-r--r--r-- 1 root root 0 Jan 20 10:27 sharetab
dfstab
"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 "
# .e.g,
# share -F nfs -o rw=engineering -d "home dirs" /export/home2
share -F nfs -o rw=v240-28 /tmp
"dfstab" 12 lines, 428 characters
#
-ef|grep rpc
daemon 2112 1 0 Jan 20 ? 0:00 /usr/sbin/rpcbind
root 21786 2160 0 14:59:41 ? 0:00 /bin/sh /lib/svc/method/rpc-ttdbserverd
root 21791 21786 0 14:59:41 ? 0:00 /usr/openwin/bin/rpc.ttdbserverd
root 21824 2160 0 14:59:46 ? 1:48 /usr/lib/netsvc/rstat/rpc.rstatd
root 7555 4924 0 10:50:54 pts/1 0:00 grep rpc
nfs dfshares:sun215a: RPC: Program not registered
-x
svc:/application/print/server:default (LP print server)
State: disabled since Thu Jan 20 10:27:38 2011
Reason: Disabled by an administrator.
See:
See: lpsched(1M)
Impact: 2 dependent services are not running. (Use -v for list.)
-x
svc:/application/print/server:default (LP print server)
State: disabled since Thu Jan 20 10:27:38 2011
Reason: Disabled by an administrator.
See:
See: lpsched(1M)
Impact: 2 dependent services are not running. (Use -v for list.)
enable svc:/network/nfs/server
-a |grep nfs
online Jan_20 svc:/network/nfs/cbd:default
online Jan_20 svc:/network/nfs/mapid:default
online Jan_20 svc:/network/nfs/status:default
online Jan_20 svc:/network/nfs/nlockmgr:default
online Jan_20 svc:/network/nfs/client:default
online 15:12:58 svc:/network/nfs/rquota:default
online 10:54:47 svc:/network/nfs/server:default
RESOURCE SERVER ACCESS TRANSPORT
sun215a:/tmp sun215a - -
#################################### Client
-a |grep nfs
disabled Jan_13 svc:/network/nfs/server:default
online Jan_13 svc:/network/nfs/cbd:default
online Jan_13 svc:/network/nfs/mapid:default
online Jan_13 svc:/network/nfs/status:default
online Jan_13 svc:/network/nfs/nlockmgr:default
online Jan_13 svc:/network/nfs/client:default
online Jan_13 svc:/network/nfs/rquota:default
/test123
sun215a:/tmp /test123
-h
Filesystem size used avail capacity Mounted on
/dev/dsk/c2t1d0s0 30G 25G 4.9G 84% /
.............................................................
/dev/dsk/c2t1d0s7 550M 1.0M 494M 1% /export/home
sun215a:/tmp 6.3G 1.0M 6.3G 1% /test123
/test123
-rlt
total 784
drwx------ 2 root root 117 Jan 20 10:28 vx.111662.063526.150400.1426
drwxr-xr-x 2 noaccess noaccess 178 Jan 20 10:28 hsperfdata_noaccess
drwx------ 2 root root 202 Jan 20 10:29 vx.112747.065736.032400.2806
drwx------ 2 root root 117 Jan 20 10:29 vx.040530.132644.071400.2996
drwx------ 2 root root 184 Jan 20 10:29 ssh-vWPz4922
-rw------- 1 root root 326412 Jan 20 14:59 dtdbcache_172.29.0
-rw-r--r-- 1 root root 186 Jan 20 14:59 breg_business_logic_20110120025941991.log
drwxr-xr-x 2 root root 179 Jan 20 14:59 hsperfdata_root
-rw-r--r-- 1 root root 166 Jan 20 14:59 rootswup.trc
srw------- 1 root root 0 Jan 20 15:00 jbp-21904295506802507357000000000-lDaaYQ
-rw------- 1 root root 85 Jan 21 11:02 croutIKEc9aife