Article View: linux.redhat.install
Article #42Re: Removing files from /lost+found
From: BerndBoettinger
Date: Thu, 04 Jun 1998 00:00
Date: Thu, 04 Jun 1998 00:00
56 lines
3379 bytes
3379 bytes
John Saunders wrote:
> Brian McCauley wrote in message ...
> >david Bowie <dbowie@turing.une.edu.au> writes:
> >
> >> Listed below are a selection of files stubbornly residing in
> >> /lost+found. I've managed to remove most of
> >> them but still over 1000 remain.
> >
> >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.
>
> >My advice is that unless you are running low on inodes (do "df -i")
> >that you simply move them to a graveyard directory and forget about
> >them.
>
> That's certainly the easiest way :)
>
> Cheers.
> -- . +-------------------------------------------------------+
> ,--_|\ | John Saunders mailto:John.Saunders@scitec.com.au |
> / Oz \ | SCITEC LIMITED Phone +61294289563 Fax +61294289933 |
> \_,--\_/ | "By the time you make ends meet, they move the ends." |
> v +-------------------------------------------------------+
Technical Details
Message-ID:
<3576F30D.E4ADD87D@swol.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3563CE81.56C6EFF1@turing.une.edu.au> <td8d8c5bc.fsf@wcl-l.bham.ac.uk> <6k31cc$65e@mailhub.scitec.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd6c,1ad5fe5d5ea6b45c X-Google-Attributes: gidfcd6c,public X-Google-Thread: 111240,1ad5fe5d5ea6b45c X-Google-Attributes: gid111240,public X-Google-Thread: 15ee82,1ad5fe5d5ea6b45c X-Google-Attributes: gid15ee82,public X-Google-Thread: 1103af,1ad5fe5d5ea6b45c X-Google-Attributes: gid1103af,public X-Google-Thread: 102983,1ad5fe5d5ea6b45c X-Google-Attributes: gid102983,public X-Google-Thread: fe2cf,1ad5fe5d5ea6b45c X-Google-Attributes: gidfe2cf,public X-Google-Thread: faa64,1ad5fe5d5ea6b45c X-Google-Attributes: gidfaa64,public From: BerndBoettinger <bb@swol.de> Subject: Re: Removing files from /lost+found Date: 1998/06/04 Message-ID: <3576F30D.E4ADD87D@swol.de> X-Deja-AN: 359575626 Content-Transfer-Encoding: 7bit References: <3563CE81.56C6EFF1@turing.une.edu.au> <td8d8c5bc.fsf@wcl-l.bham.ac.uk> <6k31cc$65e@mailhub.scitec.com.au> Content-Type: text/plain; charset=us-ascii Organization: personal MIME-Version: 1.0 Newsgroups: linux.redhat.install,alt.lnux,alt.os.linux,aus.computers.linux,comp.os.linux.misc,linux.redhat,linux.redhat.misc