nfs异步自动挂载以实现WEB访问-定位原创
个人之前做的一个测试,有时候会遇到突发情况,这个我们可以用上主机cbh 主机jiangsu
需求:在jiangsu这台机器上异步自动挂载cbh上的nfs共享目录
# yum install nfs*
# mkdir common# mkdir /common/side# echo “haha” >> /common/side/fuck
# vim /etc/exports/common 192.168.3.0/24(rw,async)
# service rpcbind start# service rpcidmapd startChkconfig rpcbind onChkconfig rpcidmapd on
# service nfs restartShutting down NFS daemon: [ OK ]Shutting down NFS mountd: [ OK ]Shutting down NFS quotas: [ OK ]Shutting down NFS services: [ OK ]Starting NFS services: [ OK ]Starting NFS quotas: [ OK ]Starting NFS mountd: [ OK ]Starting NFS daemon: [ OK ]Chkconfig nfs on
在jiangsu这台机器上进行配置# yum install nfs*# yum install autofs
# vim /etc/auto.master/net -hosts/mnt /etc/auto.ldap #添加的信息
# vim /etc/auto.ldapcommon 192.168.3.135:/common #添加的信息
# service rpcbind start# service rpcidmapd startChkconfig rpcbind onChkconfig rpcidmapd on
# service nfs start# servcice autofs start# Chkconfig nfs on# Chkconfig autofs on
# cd /mnt# cd common# lsSide# lsfuck
至此成功
页:
[1]