<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "解決restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) 錯誤"]]></title>
		<link>https://forum.andowson.com/posts/list/16.page</link>
		<description><![CDATA[Latest messages posted in the topic "解決restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) 錯誤"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>解決restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) 錯誤</title>
				<description><![CDATA[ 最近發現一台RHEL 5.1伺服器的/var/log/message出現這樣的錯誤訊息: 
<br>
[quote]Nov 21 14:19:01 localhost restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory 
<br>
Nov 21 16:21:51 localhost restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory 
<br>
Nov 22 09:39:47 localhost restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory 
<br>
Nov 22 09:40:39 localhost restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) Invalid argument[/quote] 
<br>
因為在CentOS/RHEL中/etc/sysconfig/networking/profiles/default/resolv.conf是hard link到/etc/resolv.conf，我們可以透過下列指令找出全部的hard link 
<br>
[code]find / -xdev -samefile /etc/resolv.conf[/code] 
<br>
輸出大致如下: 
<br>
[code]/etc/sysconfig/networking/profiles/default/resolv.conf 
<br>
/etc/resolv.conf[/code] 
<br>
解法，用root權限依序執行下列步驟即可: 
<br>
[code] 
<br>
rm /etc/sysconfig/networking/profiles/default/resolv.conf 
<br>
restorecon /etc/resolv.conf 
<br>
ln /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf[/code] 
<br>
參考資料: 
<br>
http://www.cyberciti.biz/faq/linux-rhel-fedora-centos-restorecond-will-not-restoreafile/]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/567/1181.page</guid>
				<link>https://forum.andowson.com/posts/preList/567/1181.page</link>
				<pubDate><![CDATA[Thu, 24 Nov 2011 10:10:58]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
	</channel>
</rss>