nfs相关命令

来源:互联网 发布:喷泉动画软件 编辑:程序博客网 时间:2024/06/08 03:08
--查看软连接
find /opt/pay_tomcat -type l|xargs ls -l


--查看无效软连接
find . -type l  -print |xargs lsattr -d 2>&1|grep "No such file or directory"| awk '{print $11}'


--创建软连接
ln -s /home/ /opt/pay_tomcat/tomcat7/webapps/
/opt/pay_tomcat/tomcat7/webapps下会出现一个软连接,名称为home,连接的地址为/home


--删除软连接
rm /opt/pay_tomcat/tomcat7/webapps/home




--nfs mount
mount -t nfs 172.29.231.93:/share /home


--取消mount
umount -f /home




--nfs服务器 设置mount文件夹及允许访问的ip
vi /etc/exports
/home/epaysch/sharefile 172.29.231.0/24(rw,no_root_squash,sync)


service rpcbind status


service nfs status
service nfs start
service nfs stop
service nfs restart


showmount -e 172.29.231.93
showmount -a


--查看nfs客户端的挂载情况
第一:查看/etc/fstab文件
命令:cat /etc/fstab
第二:df -Th可以看到挂载的信息
第三:mount可以看到你所要的信息
0 0