您的位置:首页 > 运维架构 > Linux

linux /etc/resolv.conf的硬连接报错的解决方法!

2013-06-04 14:49 1056 查看
CentOS 5.5操作系统,在/var/log/message中出现“Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory”的错误。
可以看出是/etc/resolv.conf的硬连接,inode出错了,所以需要将其删除,重建硬连接即可。其解决办法如下:$ ls -i /etc/resolv.conf #先得到inode信息
16711694 /etc/resolv.conf
$ sudo find /etc -inum 16711694 #查找硬连接
Password:
/etc/sysconfig/networking/profiles/default/resolv.conf
/etc/resolv.conf$ sudo /usr/sbin/lsof|grep resolv.conf #确认这个文件没有被打开或运行
$ sudo rm /etc/sysconfig/networking/profiles/default/resolv.conf #删除损坏的硬连接
$ sudo restorecon /etc/resolv.conf
$ sudo ln /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf #重建硬连接
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux /etc/resolv.co
相关文章推荐