做server
IXPUB技术博客$p2\7?#|R9W-?X4Y*~(k
,`VfS|q`f7590422
1:基本运行程序是/etc/init.d/rpc和/etc/init.d/nfs.server
K \
wjfL7590422
7F!Tx1C'V-Y[7590422
启动服务
IXPUB技术博客!S&};ySi{J
/etc/rc3.d/backup/S15nfs.server start
_x-g
}9Q+_8P7|-\7590422
'^^%X@di7590422
S15nfs.server包含了rpc和nfs.server,还有日志等一些其它有用的程序.建议用S15nfs.server启动nfs的server端
IXPUB技术博客3^!?4qmR)ab:qU
O!@$R},E8Z7590422
要是想每次从起后都运行,保证S15nfs.server在/etc/rc3.d目录下
u!q4g5v'ao&E7590422
IXPUB技术博客:j7mgR(V
2:共享目录
G zQ0~r{.@PO7590422
vi /etc/dfs/dfstab文件中有共享条目,这些共享目录会在守护进程启动时自动共享。
S$Fs/BiM d;zl(A7590422
这些进程在系统进入运行级别2时自动运行。
1s1d"N4~#B7590422
挂接远程网络文件系统
IXPUB技术博客;hc9yUiZ'ksX
# share -F nfs -o rw=engineering -d "home dirs" /export/home2
IXPUB技术博客;A&OV\&li9n,~%Uz
例如:share -F nfs -o ro=202.108.42.90:202.108.42.91 /home2
IXPUB技术博客 u ~w*@6JF
share -F nfs -o ro=@202.108.42.0/24 /home2
;YU;`0LELf0U7590422
IXPUB技术博客 Ogl"DUz
-o specific_options
PS_+Nd)R9|Av*h7590422
The specific_options are used to control access of the
IXPUB技术博客OG C*^
Q/Cxf
shared resource. (See share_nfs(1M) for the NFS
YNKk7nsY-[7}*mJ7wJ7590422
specific options.) They may be any of the following:
dXE7paq-~"U,}7590422
9l"mci-`7590422
rw pathname is shared read/write to all clients.
2d1A5z&d8n~;B7590422
This is also the default behavior.
IXPUB技术博客.|!h:l,`#q*~
{xB9j^7590422
rw=client[:client]... 或一个网段 rw=@202.108.42.0/24
IXPUB技术博客v \v-~7?m-rBCY'}o
pathname is shared read/write only to the listed
GR7N"GMo/K E7590422
clients. No other systems can access pathname.
IXPUB技术博客%w)M[V|
H H}'Ny
'[Ad@r.m$_m7590422
ro pathname is shared read-only to all clients.
IXPUB技术博客gxg}6XU#|0t
IXPUB技术博客(z.URe)f,J0Rm@
ro=client[:client]... 或一个网段 rw=@202.108.42.0/24
jn]:\Q-C7590422
pathname is shared read-only only to the listed
IXPUB技术博客5|,b%X-`G:Z;e%J
clients. No other systems can access pathname.
Gv
v1D@8U\7590422
4r f9vh l!O7590422
-d description
IXPUB技术博客7WP9S0WQ#_&CX+C9Q
The -d flag may be used to provide a description of
IXPUB技术博客&`5g9Ymz
`;V}7w&v
the resource being shared.
;^{j'Q TR"Y
H7590422
dfshares命令
IXPUB技术博客u
Jp
r$N(x!vM
用以查看服务器的共享资源
IXPUB技术博客f(kJ
o2^lu1d
!d]_
ec
Ng7590422
dfmounts命令
Z5R_+jaL9x8q7590422
服务器上查看共享资源被利用的状况
/d\NP
z r7590422
IXPUB技术博客og6OggUe
用nfsstat看nfs的全部状态
IXPUB技术博客,f-At5i}/YG,N'N
Q!v WzT![~{7590422
I!racMV;k$`7590422
做client
IXPUB技术博客&ewa${]wZ
3Z*G&[;j W7590422
1:基本运行程序是/usr/lib/nfs/statd和/usr/lib/nfs/lockd
&Yi)EN1V+V0X)R
e0p1w4I:f7590422
IXPUB技术博客+u;d][!T"B9aP
启动服务
*Cg|.|{7590422
/etc/rc3.d/backup/S73nfs.client start
.whAmQvU7590422
IXPUB技术博客9YE]4QYZmWgVu
S73nfs.lient包含了statd和lockd,还有日志等一些其它有用的程序.建议用S73nfs.client启动nfs的client端
IXPUB技术博客,J:Yp
|V,Qx(}D9\
Ly
X9~[ K0J7590422
要是想每次从起后都运行,保证S73nfs.client在/etc/rc2.d目录下