Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /sbin/restore behavior

On 05/31/2012 10:49 PM, Aaron J. Grier wrote:
> On Sun, Jan 01, 2012 at 07:57:06AM -0800, Paul Goyette wrote:
>> While trying to recover from my recent attempts to upgrade, I have 
>> noticed that '/sbin/restore -x -u' doesn't seem to work as expected.
>> I would expect the -u to unlink both the files _and_hard_links_ being 
>> restored.  However, when restoring a hard link, it does not unlink the 
>> original, and displays an error message instead.
>> Is this behavior correct?
> is it low cost to determine which files are linked to a given inode?
> certainly you can determine the count, but doesn't figuring out which
> directory entries are linked to a given inode require traversing the
> entire filesystem space until all links are found?

Doing a restore, one would expect the -u to apply to everything on the
tape, i.e. unlink-and-recreate the file, then at the end, during restoring
hard links, unlink the link prior to linking, thus averting the error.
What exists on disk at that point is completely irrelevant, really, and
no filesystem traversal/examination is necessary.

Home | Main Index | Thread Index | Old Index