[comp.unix.ultrix] Help in removing corrupt directory !

hpc@cattell.psych.upenn.edu (Hua Pei Chen) (01/23/91)

	I would like to have some advice on how to remove a corrupt
directory in a file system.  The problem first started as an FER error
for an LBN xxx.  I cleared the forced error indicator for that block, and
now found out that it was a corrupted directory.  The directory itself
seems to be fine, but it contains a file with a very long name
("m[[bbmm...").  The i-number for this file is a negative number, so the
file is totally transparent.  Both rm -r and rmdir failed.  I have also 
tried "clri" and "fsck" the filesystem, "clri" does not recognize the
negative inode, and "fsck" can not salvage the corrupt directory.  Besides
scratching the whole file system and restore it, is there another way to
physically remove this corrupted directory(file)?  I appreciate any kind of
response.  


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-
Hua-Pei Chen, 				System Administrator, 
Psychology Department,			University of Pennsylvania.
email -- hpc@cattell.psych.upenn.edu	(215) 898-2141 office

mike@raven.uss.tek.com (Mike Ewan) (01/23/91)

In article <36066@netnews.upenn.edu> hpc@cattell.psych.upenn.edu (Hua Pei Chen) writes:
>[...]  
>I have also 
>tried "clri" and "fsck" the filesystem, "clri" does not recognize the
>negative inode, and "fsck" can not salvage the corrupt directory.  Besides
>scratching the whole file system and restore it, is there another way to
>physically remove this corrupted directory(file)? 

Try moving all the stuff in the directory to someplace else and then 'clri'
the directory followed by fsck.  Be careful not to move the bogus file 
when you move the stuff out of the directory.

Mike



--
 Michael Ewan    (503)627-6468      Internet:  mike@raven.USS.TEK.COM
 Unix Systems Support                   UUCP:  ...!tektronix!puffin!raven!mike
 Tektronix, Inc.                  Compuserve:  73747,2304
"Fig Newton: The force required to accelerate a fig 39.37 inches/sec."--J. Hart

clewis@ferret.ocunix.on.ca (Chris Lewis) (01/24/91)

In article <36066@netnews.upenn.edu> hpc@cattell.psych.upenn.edu (Hua Pei Chen) writes:

|	I would like to have some advice on how to remove a corrupt
|directory in a file system....
|The directory itself
|seems to be fine, but it contains a file with a very long name
|("m[[bbmm...").  The i-number for this file is a negative number, so the
|file is totally transparent.  Both rm -r and rmdir failed.  I have also 
|tried "clri" and "fsck" the filesystem, "clri" does not recognize the
|negative inode, and "fsck" can not salvage the corrupt directory.  Besides
|scratching the whole file system and restore it, is there another way to
|physically remove this corrupted directory(file)?

First, move any files under this directory that you need, then clri
the directory inode.  A following fsck should take out both the
directory and the corrupt file.
-- 
Chris Lewis, Phone: (613) 832-0541, Internet: clewis@ferret.ocunix.on.ca
UUCP: uunet!mitel!cunews!latour!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request@eci386)