问题描述
A机器共享nfs,B机器挂载A的nfs
当A机器的ip改变后,B机器就会出现df -h挂起的问题
用mount -a重现挂载命令也会挂起了
解决办法:
#先看看挂载点:
tail /etc/fstab
#修改为修改之后的Ip
[root@localhost ~]# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Apr 27 01:18:20 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos-root / xfs defaults 0 0
UUID=f19e0dd5-1b9a-47fa-b34d-38a77c91f800 /boot xfs defaults 0 0
/dev/mapper/centos-opt /opt xfs defaults 0 0
UUID=b35c4a8d-18c5-4db2-9e6b-0fb37821e930 swap swap defaults 0 0
1.1.1.1:/opt/htdocs /opt/htdocs nfs nolock 0 0
#先强制把挂载去掉
umount -lf /opt/htdocs
#重新挂载
mount -a
最后再执行df -h查看,就好了