Re: Restoring inode information



Roland <rmelkert@xxxxxxxxx> wrote:
> I've had a hard drive failure. I lost two directories.

> The thing is if I do 'ls -lhi' it still reports the two corrupted
> directories, like:

> ? ?--------- ? ? ? ? ? StuffA
> 12357463 drwxr-x--- 4 roland roland 4.0K Sep 2 01:54 StuffB
> ? ?--------- ? ? ? ? ? StuffC
> 11866015 drwxr-x--- 5 roland roland 4.0K Jan 6 2005 StuffD
> ? ?--------- ? ? ? ? ? StuffE

I don't understand - the above shows FIVE directory entries, all of
them corrupted, not TWO "corrupted directories". My best guess would be
that the (ONE) directory inode whose entries yu are viewing is corrupted
and everything else is OK.

> I guess the inode information is corrupted. But I am hesitating to do a
> fsck, because I'm afraid it will do more harm then good?

Looks harmless to me, but then I don't understand what you think is
wrong and how it relates to what you ahve shown.

> Is there any way to restore the directories or some of its sub
> directories without fsck?

I don't understand what you mean. I see evidence of only one failure
for certain, and that may or may not be mended by a fsck, but no harm
can be done (either the inode pointers in those entries are wrong, or
they are not, but either way fsck will not make right ones into wrong
ones).

You need more data before deciding.

Peter
.



Relevant Pages

  • Re: fsck on a live FS on AIX 7.1.0.0
    ... After doing a fsck against the filesystem we suspect might have issues, ... Inode 40190 is linked as: ... I find two other filesystems have warnings/errors. ... For the EMC service outages, I would be demanding root cause analysis from ...
    (AIX-L)
  • soft updates / background fsck directory link count bug
    ... and background fsck that results in the link count of the parent of one ... the leaf directory being removed, the file system unmounted, and then ... current inode: directory ... fsdb > inode 320921 ...
    (freebsd-current)
  • Data loss after power out - fsck: bad inode number to nextinode
    ... in my new system (FreeBSD 7.0). ... I booted the system in SUM and ran fsck on the partitions. ... du: mnt/adec: Bad file descriptor ... error message "bad inode number 306176 to nextinode" because it cannot ...
    (freebsd-questions)
  • Re: Data loss after power out - fsck: bad inode number to nextinode
    ... I booted the system in SUM and ran fsck on the partitions. ... Commander, the name of my home directory was displayed, preceeded ... du: mnt/adec: Bad file descriptor ... informative error message "bad inode number 306176 to nextinode" ...
    (freebsd-questions)
  • Re: UFS+J panics on HEAD
    ... which a clri and a fully forced fsck -y -f seems to have cleared (thanks to ... that fsck is failing to correct... ... The bitmap indicated that an inode was free, ... I would not worry much about ffs code until known hardware problem on ...
    (freebsd-current)