# 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=$? }