* How to remove a corrupted dir in an ext4 FS?
@ 2010-10-24 11:12 Jesus Sanchez Melendro
2010-10-25 14:16 ` Andreas Dilger
0 siblings, 1 reply; 3+ messages in thread
From: Jesus Sanchez Melendro @ 2010-10-24 11:12 UTC (permalink / raw)
To: linux-ext4
After a corruption in an ext4 filesystem, I've checked and moved to the
correct position all the files and dirs in lost+found, but one of the dirs is
corrupted.
The "ls -l" command says:
d????????? ? ? ? ? ? /lost+found/#90116
If I try to remove it with "rmdir" or "rm -rf" or "mv" or "unlink", all
commands say:
<command used>: failed to remove `#90116': Input/output error
Running "fsck" says that the filesystem is OK.
Is there a way to remove that corrupted dir?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to remove a corrupted dir in an ext4 FS?
2010-10-24 11:12 How to remove a corrupted dir in an ext4 FS? Jesus Sanchez Melendro
@ 2010-10-25 14:16 ` Andreas Dilger
2010-10-25 14:29 ` Ted Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Dilger @ 2010-10-25 14:16 UTC (permalink / raw)
To: Jesus Sanchez Melendro; +Cc: linux-ext4
On 2010-10-24, at 19:12, Jesus Sanchez Melendro wrote:
> After a corruption in an ext4 filesystem, I've checked and moved to the
> correct position all the files and dirs in lost+found, but one of the dirs is
> corrupted.
>
> The "ls -l" command says:
> d????????? ? ? ? ? ? /lost+found/#90116
>
> If I try to remove it with "rmdir" or "rm -rf" or "mv" or "unlink", all
> commands say:
> <command used>: failed to remove `#90116': Input/output error
>
> Running "fsck" says that the filesystem is OK.
>
> Is there a way to remove that corrupted dir?
You can probably check "lsattr /lost+found/#90116" to see if either the "i" (immutable) or "a" (append-only) attribute is set. If yes, then running "chattr -i -a/lost+found/#90116" will remove those attributes, and it should be removable.
Cheers, Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to remove a corrupted dir in an ext4 FS?
2010-10-25 14:16 ` Andreas Dilger
@ 2010-10-25 14:29 ` Ted Ts'o
0 siblings, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2010-10-25 14:29 UTC (permalink / raw)
To: Andreas Dilger; +Cc: Jesus Sanchez Melendro, linux-ext4
On Mon, Oct 25, 2010 at 10:16:55PM +0800, Andreas Dilger wrote:
> On 2010-10-24, at 19:12, Jesus Sanchez Melendro wrote:
> > After a corruption in an ext4 filesystem, I've checked and moved to the
> > correct position all the files and dirs in lost+found, but one of the dirs is
> > corrupted.
> >
> > The "ls -l" command says:
> > d????????? ? ? ? ? ? /lost+found/#90116
> >
> > If I try to remove it with "rmdir" or "rm -rf" or "mv" or "unlink", all
> > commands say:
> > <command used>: failed to remove `#90116': Input/output error
> >
> > Running "fsck" says that the filesystem is OK.
> >
> > Is there a way to remove that corrupted dir?
>
> You can probably check "lsattr /lost+found/#90116" to see if either
> the "i" (immutable) or "a" (append-only) attribute is set. If yes,
> then running "chattr -i -a/lost+found/#90116" will remove those
> attributes, and it should be removable.
If it was an immutable or apppend-only attribute, it should have
resulted in a "Operation not permitted" error. I suspect the problem
may be an underlying disk error. You might want to check "dmesg", and
see if the hard drive is reporting I/O errors. It may very well be
that you have problems a lot more serious than just a corrupted file
system. If so, you might want to consider making an immediate backup
right away, and strongly consider replacing the hard drive if you find
I/O errors in your system logs.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-25 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-24 11:12 How to remove a corrupted dir in an ext4 FS? Jesus Sanchez Melendro
2010-10-25 14:16 ` Andreas Dilger
2010-10-25 14:29 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).