1754372 Members
3305 Online
108813 Solutions
New Discussion

Restorecond

 
zubi_1
Occasional Contributor

Restorecond

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

Can anyone please help me to resolve this as I see this messages in syslog.

Thanks
1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: Restorecond

Someone or something has made an additional hard link to your /etc/resolv.conf file.

(Normally a file has just one hard link to it; removing that link will cause the file to be deleted. This is what the "rm" command does.)

Use "ls -li /etc/resolv.conf" to identify the inode number of the file. To find the extra link, use

find / -inum -xdev

or (GNU find specific)

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

It's possible that you won't find nothing at all: in this case, whatever caused the problem may have also fixed it afterwards.

The message might be caused by someone editing the resolv.conf file: if so, find out which editor is used. This message might be caused by the way the editor creates backup versions of the file. If this is the cause, it's probably harmless. You might be able to avoid the message if the editor can be configured to create backup files in an alternate way.

MK
MK