# exportfs -o rw,all_squash,sync,anonuid=500,anongid=500 172.16.0.0/24:/www # exportfs /www 172.16.0.0/24 # cat /var/lib/nfs/etab /www 172.16.0.0/24(rw,sync,wdelay,hide,nocrossmnt,secure,root_squash,all_squash,no_subtree_check,secure_locks,acl,anonuid=500,anongid=500)
reload /etc/exports
/usr/sbin/exportfs -r
To unexport the /usr/tmp directory:
# exportfs -u netkiller.github.com:/usr/tmp
To unexport all exports listed in /etc/exports:
# exportfs -au
#!/bin/bash RETVAL=0 start() { /usr/sbin/exportfs -o rw,all_squash,sync,anonuid=500,anongid=500 172.16.0.0/24:/backup mount /dev/sdb1 /backup RETVAL=$? echo } stop() { exportfs -u 172.16.0.0/24:/backup umount /backup RETVAL=$? }
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>comments powered by Disqus
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。