Article View: alt.os.linux.slackware
Article #30Re: Clean Up lost+found
From: Clifford Kite
Date: Tue, 16 Feb 1999 00:00
Date: Tue, 16 Feb 1999 00:00
58 lines
3039 bytes
3039 bytes
Jayasuthan (suthan@netscape.net) wrote:
: Hi,
: Lately I had a consider massive file corruption .. lucky that none
: critical file corrupted. I could restore from backup but before that I
: need some help. How can I clean up lost+found files.. < I don't want it
: >. Two thos corrupted files ... how can I remove went "rm" doesn't works. The corrupted file is in device format linux file under /dev/.
Here is an old post on this subject. I haven't had an occasion to use
the technique described and disclaim any responsibility for whatever
happens when you use it.
---
Subject: Re: Removing files from /lost+found
>
>These will be corrupt, immuable, device inodes. You can only get rid
>of them with a low-level filesystem editor (see previous posts on the
>topic) as chattr does not work on device inodes for non-existant
>devices.
The only way to really clear these is to boot up single user
mode with the disk unmounted (or mounted read-only if it's the
root filesystem). Make a list of the file (The #nnnn number is
the inode number, you can confirm this by doing ls -i) inodes
into a file. Edit the file so that it's a list of commands like
clri <inode-number>
With with <inode-number> replaced by the inode number of
the file, of course. You can do this by...
cd /lost+found ; ls -i | awk '{print $1}' | sed -e '1,$ s/^/clri /'
>script_file
Then run debugfs with the -w and -f option to clear the inodes.
When debugfs exits, run a full e2fsck. This should detect the now
unreferenced files from lost+found and remove them.
debugfs -w -f script_file
e2fsck -fvy /dev/...
I had a machine once that use to mangle the news spool once a
week (turned out to be memory problems). Anyway this proceedure
became second nature.
Oh yeah, almost forgot the disclaimer. What you are about to do
is serious black magic so anything you trash is your own
responsibly. :) Make sure to read up the man pages first.
: This problem cause under Kernel 2.2.0 ... hdparm -m8 is consider a
: dangerous option. Please watchout !
--
Clifford Kite <kite@inetport.com> Not a guru. (tm)
/* Microsoft is a great marketing organization.
* It _has_ to be */
Technical Details
Message-ID:
<7abvkd$ntu@inetport.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36CA009D.C7085FD@netscape.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f906c,73af548683d0b2e6 X-Google-Attributes: gidf906c,public X-Google-Thread: 102b32,73af548683d0b2e6 X-Google-Attributes: gid102b32,public X-Google-Thread: 10669a,73af548683d0b2e6 X-Google-Attributes: gid10669a,public X-Google-Thread: 11033e,73af548683d0b2e6 X-Google-Attributes: gid11033e,public From: kite@NoSpam.inetport.com (Clifford Kite) Subject: Re: Clean Up lost+found Date: 1999/02/16 Message-ID: <7abvkd$ntu@inetport.com> X-Deja-AN: 444954182 References: <36CA009D.C7085FD@netscape.net> Followup-To: alt.os.linux.slackware,comp.os.linux.networking,comp.os.linux.hardware,ahn.tech.linux Organization: |Chaos| Newsgroups: alt.os.linux.slackware,comp.os.linux.networking,comp.os.linux.hardware,ahn.tech.linux