linux版本为
引用
[root@red42 ~]# uname -a
Linux red42 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux
该主机作为nfs的server端,执行exportfs -a时报错
引用
[root@red42 ~]# exportfs -a
exportfs: No host name given with /Tbackup/ora10g1 (rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,subtree_check,secure_locks,mapping=identity,anonuid=-2,anongid=-2), suggest *(rw,sync,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,subtree_check,secure_locks,mapping=identity,anonuid=-2,anongid=-2) to avoid warning
查看/etc/hosts文件,正常
引用
[root@red42 ~]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost
172.16.4.67 red41
172.16.4.68 red42
查看/etc/exports文件,正常
引用
[root@red42 ~]# more /etc/exports
/Tbackup/ora10g1 172.16.4.67(rw,async,no_root_squash)
尝试用以下命令,执行成功
引用
[root@red42 ~]# exportfs -ra
下面看一下各个参数的作用,尤其注意r参数
引用
OPTIONS
-a Export or unexport all directories.
-o options,...
Specify a list of export options in the same manner as in exports(5).
-i Ignore the /etc/exports file, so that only default options and options given on the command line are used.
-r Reexport all directories. It synchronizes /var/lib/nfs/xtab with /etc/exports. It removes entries in
/var/lib/nfs/xtab which are deleted from /etc/exports, and remove any entries from the kernel export table which
are no longer valid.
-u Unexport one or more directories.
-f In 鈥檔ew鈥?mode, flush everything out of the kernels export table. Any clients that are active will get new entries
added by mountd when they make their next request.
-v Be verbose. When exporting or unexporting, show what鈥檚 going on. When displaying the current export list, also dis-
play the list of export options.