使用exportfs命令来重新加载/etc/exports文件

当修改/etc/exports文件后,文件是不会立即生效的。
需要使用如下命令来重新加载exports文件:
[root@localhost huage]# exportfs -a

[root@localhost huage]# vi /etc/exports
[root@localhost huage]# showmount -e
Export list for localhost.localdomain:
/home/huage *
[root@localhost huage]# exportfs -a
[root@localhost huage]# showmount -e
Export list for localhost.localdomain:
/opt        *
/home/huage *

[root@localhost huage]# man exportfs
[root@localhost huage]# cat /var/lib/nfs/etab
/opt *(ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534)
/home/huage *(rw,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534)

你可能感兴趣的:(ubuntu,nfs)