Quantcast
Viewing latest article 6
Browse Latest Browse All 10

Will not restore a file with more than one hard link (/etc/resolv.conf) Invalid argument

一台生产机 redhat 5.8 最近看到log日志里有报以下错误
“Will not restore a file with more than one hard link (/etc/resolv.conf) Invalid argument”

查询google,找到解决办法

可以通过下述指令查找硬链接:

find / -xdev -samefile /etc/resolv.conf

解决办法如下:

ls -i /etc/resolv.conf # 找一下这个文件连接到哪
find /etc -inum 1638416 # 数字是上面
lsof | grep resolv.conf # 确认没有进程在使用
rm /etc/sysconfig/networking/profiles/default/resolv.conf
restorecon /etc/resolv.conf
ln /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf
service network restart

希望能解决问题


Viewing latest article 6
Browse Latest Browse All 10

Trending Articles