crash_recovery_minutia

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: How to delete undeleteable file?
From: hendrick@design.mxim.com (Hendrick Chan)
Date: Wed, 22 Nov 2000 14:17:09 -0800

"Chad W. Skinner" wrote:

> Timothy Reaves wrote:

> >       After some hard drive corruption (due to a crash) I have
> > several files
> > that look like:
> > b--xr-x--t    1 27740    25193     98, 105 Aug 11  2027 media
> >
> > even as root, rm & chmod, do not work.  What next?
> >
> > [root@double treaves]# rm media
> > rm: remove `media'? y
> > rm: cannot unlink `media': Operation not permitted
> > [root@double treaves]#


> Can you alter other files on the disk? If not the device might be mounted
> read only.

What does fsck says about the filesystem of these files?
The file might reflex some sector on the drive itself might went bad, or a
PHD (Permanent Head Damage)

===


Subject: Re: How to delete undeleteable file?
From: Matthew Melvin <matthewm@webcentral.com.au>
Date: Thu, 23 Nov 2000 09:30:36 +1000 (EST)

On Wed, 22 Nov 2000, Timothy Reaves wrote:

> 	After some hard drive corruption (due to a crash) I have several files
> that look like:
> b--xr-x--t    1 27740    25193     98, 105 Aug 11  2027 media
>
> even as root, rm & chmod, do not work.  What next?
>

Since this is a result of a crash and the perms are obviously well stuffed
could it be that the attributes are stuffed as well?  Does 'lsattr' show the
immutable or append only bits being set?  Ditto for the permissions and
attributs of the treaves directory itself.  Assuming yes - remove them with
'chattr' and try again?  Anyway - just another thing to check out. :)

===

Subject: Re: How to delete undeleteable file?
From: Statux <statux@bigfoot.com>
Date: Wed, 22 Nov 2000 18:47:20 -0500 (EST)

After some hard drive corruption (due to a crash) I have several files
> > that look like:

This file is marked as a block special file which only root can remove.
You can try doing 'chmod 0664 media' (with the leading 0) and see what
happens... but if a crash changed a bunch of files over to block special..
yer simplest solution is to toss em (as root) and forget about it ;)

Why did they become block special files? <shrug> note the major and minor
numbers tho.. and the user:group settings. Looks like data corruption.
Just toss em ;)

Again, only root can manipulate files like this :)

===

Subject: Re: How to delete undeleteable file?
From: Timothy Reaves <treaves@silverfields.com>
Date: Fri, 24 Nov 2000 10:15:27 -0500

> Again, only root can manipulate files like this :)

no good:


[root@double treaves]# whoami
root
[root@double treaves]# chmod 0664 media
chmod: media: Operation not permitted
[root@double treaves]# chmod 0664 .starteam
chmod: .starteam: Operation not permitted
[root@double treaves]#

===

Subject: Re: How to delete undeleteable file?
From: "John P. Verel" <jverel@home.com>
Date: Thu, 23 Nov 2000 22:46:46 -0500

On 11/22/00, 02:45:13PM -0500, Timothy Reaves wrote:
> 	After some hard drive corruption (due to a crash) I have several files 
> that look like:
> b--xr-x--t    1 27740    25193     98, 105 Aug 11  2027 media
> 
> even as root, rm & chmod, do not work.  What next?
> 
While logged in as root, try using Emacs directory editor, Dired, to excise
them.  Others have reported success this way.  Let us know how you make out?

===

Subject: Re: How to delete undeleteable file?
From: Greg Martin <gregm@netidea.com>
Date: Fri, 24 Nov 2000 08:52:33 -0800

Timothy Reaves wrote:
> 
> Statux wrote:
> 
> >>>     After some hard drive corruption (due to a crash) I have several files
> >>> that look like:
> >>
> >
> > This file is marked as a block special file which only root can remove.
> > You can try doing 'chmod 0664 media' (with the leading 0) and see what
> > happens... but if a crash changed a bunch of files over to block special..
> > yer simplest solution is to toss em (as root) and forget about it ;)
> >
> > Why did they become block special files? <shrug> note the major and minor
> > numbers tho.. and the user:group settings. Looks like data corruption.
> > Just toss em ;)
> >
> > Again, only root can manipulate files like this :)
> >
> >
> 
> no good:
> 
> [root@double treaves]# whoami
> root
> [root@double treaves]# chmod 0664 media
> chmod: media: Operation not permitted
> [root@double treaves]# chmod 0664 .starteam
> chmod: .starteam: Operation not permitted
> [root@double treaves]#
> 

Have you tried over writing them and then deleting or using rm -f?

===

Subject: Re: How to delete undeleteable file?
From: Dave Ihnat <ignatz@dminet.com>
Date: Fri, 24 Nov 2000 11:21:23 -0600

On Fri, Nov 24, 2000 at 08:52:33AM -0800, Greg Martin wrote:
> Timothy Reaves wrote:
> 
> Have you tried over writing them and then deleting or using rm -f?

Silly question--use 'chattr' to see if extended permissions have been hosed.

===

Subject: Re: How to delete undeleteable file?
From: Timothy Reaves <treaves@silverfields.com>
Date: Fri, 24 Nov 2000 16:03:59 -0500

Dave Ihnat wrote:

> On Fri, Nov 24, 2000 at 11:21:23AM -0600, Dave Ihnat wrote:
> 
>> On Fri, Nov 24, 2000 at 08:52:33AM -0800, Greg Martin wrote:
>> Silly question--use 'chattr' to see if extended permissions have been hosed.
> 
> 
> BTW, on reading this I see it could be taken wrong.  I meant *I* had a silly
> question, not that *yours* is silly.
> 
> Cheers,

Damn!  And I had my flames all set! ;-}

I looked at the man page, and -i seemed the only relevent option.  media 
mas a symlink to another directroy.  .starteam was a file.


[root@double treaves]# chattr -i media
chattr: No such device while reading flags on media
[root@double treaves]#
[root@double treaves]# chattr -i .statream
chattr: No such file or directory while stating .statream
[root@double treaves]#

[root@double treaves]# cp .bashrc .starteam
cp: overwrite `.starteam'? y
cp: cannot create regular file `.starteam': Operation not permitted
[root@double treaves]#

===


Subject: Re: How to delete undeleteable file?
From: Statux <statux@bigfoot.com>
Date: Fri, 24 Nov 2000 18:30:50 -0500 (EST)

Have you run fsck.ext2 on the partitions?

If not, run it first.. then if the stuff remains, use debugfs (from the
package of the same name.. _I think_, man debugfs for details) to mark the
inodes as deleted (link count 0, dtime non-zero), quit, then fsck the
partition again. See if that helps. If not even that works, then your only
option would be possibly to reformat :/ Editing the filesystem directly
should work tho.

===



the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu