From: Theodore Tso <tytso@mit.edu>
To: Molle Bestefich <molle.bestefich@gmail.com>
Cc: linux-kernel@vger.kernel.org, Duane Griffin <duaneg@dghda.com>
Subject: Re: ext3 corruption
Date: Sat, 12 Aug 2006 17:47:20 -0400 [thread overview]
Message-ID: <20060812214719.GA19156@thunk.org> (raw)
In-Reply-To: <62b0912f0608121024y1dde66aavcbf4df04631772c4@mail.gmail.com>
On Sat, Aug 12, 2006 at 07:24:06PM +0200, Molle Bestefich wrote:
>
> Good to have backups. It would be very useful to know whether e2fsck
> contemplates writing those back as primary BGDs when it's done, but I
> couldn't find that in the documentation. Will it?
Yes, it will.
> (Would be good to have the above information in the docs. Perhaps in
> a "what does this message mean?" section.)
Well, if someone would like to volunteer to be a technical writer,
that would be great......
> (Such a section would also help a lot when confronted with the first
> message: "Entry blah is a link to directory bluh. Clear? y/n".
> Obviously I don't want to "clear" my data. But why is e2fsck
> confronting me with that question? Is something wrong with it that it
> should be cleared?)
Basically, there are two modes that e2fsck can run in. What the boot
scripts use is called "preen" mode, which will automatically fix
"safe" things, and stop if there are anything where the user
administrator might need to need to exercise discretion, or where the
system administrator should know that there might be something that he
or she needs to clean up (like orphaned inodes getting linked into the
lost+found directory, for example).
In the normal mode, e2fsck asks permission before it does anything.
In general, the default answer is "safe", but there are times when a=
filesystem expert can do better by declining to fix a problem and then
using debugfs afterwards to try to recover data before running e2fsck
a second time to completely clear out all of the problems.
If you don't like that, you can always run with e2fsck -y, which wil
clause e2fsck to never ask permission before going ahead and trying
its best to fix the problem.
> >The summary information in the backup block group
> >descriptors is not backed up, for speed/performance reasons. This is
> >not a problem, since that information can always be regenerated
> >trivially from the pass 5 information.
>
> Thanks for the information!
> (Would be very helpful to have a copy/paste of the above in the docs too...)
Well, the e2fsck man page isn't intended to be a tutorial. If someone
wants to volunteer to write an extended introduction to how e2fsck
works and what all of the messages mean, I'd certainly be willing to
work with that person... So if you're willing to volunteer or willing
to chip in to pay for a technical writer, let me know....
> I'm wondering why it even tries to use the corrupt information, instead of
> just:
> * reconstructing it from scratch
> * not asking the user?
It did reconstruct it from scratch; that's what pass 5 is all about.
It just didn't store it in the block group descriptors, because of the
-n option.
> >I can imagine accepting a patch which sets a flag if any discrepancies
> >found in pass 5 are not fixed, and then if the summary information is
> >requested,
>
> Huh? The user didn't request anything, it always prints.
The summary information is only printed when the -v option is given,
and that's about all the -v option does. The summary information is
not the primary raison d'etre for e2fsck, so I'm not going to waste a
lot of time trying to keep two copies of the information so that the
information can be correct in the -nv case. That's just soooooo
unimportant, and most users don't use the -v option anyway.
> >with the filesystem. Is it 100% accurate? No, but that was never the
> >goal of e2fsck -n. If you want that, then use a dm-snapshot, and run
> >e2fsck on the snapshot....
>
> Agreed. Running a r/w e2fsck on some kind of overlay would be the way
> to implement a more useful (for me anyway) version of -n.
>
> But I think dm-snapshot is useless in this case because....
Well, I have the following project listed in the TODO file for
e2fsprogs:
4) Create a new I/O manager (i.e., test_io.c, unix_io.c, et.al.) which
layers on top of an existing I/O manager which provides copy-on-write
functionality. This COW I/O manager takes will take two open I/O
managers, call them "base" and "changed". The "base" I/O manager is
opened read/only, so any changes are written instead to the "changed"
I/O manager, in a compact, non-sparse format containing the intended
modification to the "base" filesystem.
This will allow resize2fs to figure out what changes need to made to
extend a filesystem, or expand the size of inodes in the inode table,
and the changes can be pushed the filesystem in one fell swoop. (If
the system crashes; the program which runs the "changed" file can be
re-run, much like a journal replay. My assumption is that the COW
file will contain the filesystem UUID in a the COW superblock, and the
COW file will be stored in some place such as /var/state/e2fsprogs,
with an init.d file to automate the replay so we can recover cleanly
from a crash during the resize2fs process.)
Difficulty: Medium Priority: Medium
Patches to implement this would be gratefully accepted....
(This is open source, which means if people who have the bad manners
to kvetch that volunteers have done all of this free work for them
haven't done $FOO will be gently reminded that patches to implement
$FOO are always welcome. :-)
- Ted
next prev parent reply other threads:[~2006-08-12 21:47 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 20:32 ext3 corruption Molle Bestefich
2006-08-08 23:47 ` Molle Bestefich
2006-08-09 1:33 ` Sergio Monteiro Basto
2006-08-09 10:36 ` Molle Bestefich
2006-08-09 11:33 ` linux-os (Dick Johnson)
2006-08-09 15:22 ` Molle Bestefich
2006-08-09 15:38 ` Michael Loftis
2006-08-09 18:28 ` Molle Bestefich
2006-08-09 18:41 ` Mws
2006-08-09 20:17 ` Duane Griffin
2006-08-09 20:47 ` Molle Bestefich
[not found] ` <e9e943910608091527t3b88da7eo837f6adc1e1e6f98@mail.gmail.com>
2006-08-09 23:09 ` Molle Bestefich
2006-08-10 0:08 ` Duane Griffin
2006-08-10 21:00 ` Molle Bestefich
2006-08-12 16:38 ` Theodore Tso
2006-08-12 17:24 ` Molle Bestefich
2006-08-12 21:47 ` Theodore Tso [this message]
2006-08-13 19:21 ` Molle Bestefich
2006-08-14 3:23 ` Kyle Moffett
2006-08-14 15:34 ` Theodore Tso
2006-08-14 17:21 ` Molle Bestefich
2006-08-10 3:06 ` Jim Crilly
2006-08-10 9:48 ` Molle Bestefich
2006-08-10 11:41 ` linux-os (Dick Johnson)
2006-08-10 12:21 ` Molle Bestefich
2006-08-10 12:19 ` Helge Hafting
2006-08-10 13:00 ` Molle Bestefich
2006-08-10 14:40 ` gmu 2k6
2006-09-24 8:56 ` Molle Bestefich
2006-09-25 12:27 ` Helge Hafting
2006-10-02 2:40 ` Molle Bestefich
2006-10-02 3:24 ` Gene Heskett
2006-10-02 6:50 ` Kyle Moffett
2006-08-10 16:10 ` John Stoffel
2006-08-10 19:10 ` Molle Bestefich
2006-08-11 8:06 ` Helge Hafting
2006-08-11 13:26 ` Horst H. von Brand
2006-08-12 8:54 ` Molle Bestefich
2006-08-12 10:31 ` Molle Bestefich
2006-08-17 1:27 ` Horst H. von Brand
2006-08-17 13:46 ` Molle Bestefich
2006-08-10 8:32 ` Bernd Petrovitsch
2006-08-10 7:44 ` Denis Vlasenko
[not found] <Pine.LNX.4.33.0207121337500.8654-100000@coffee.psychology.mcmaster.ca>
2002-07-12 19:05 ` Alec Smith
2002-07-12 20:11 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2002-07-12 15:32 Alec Smith
2002-07-12 15:52 ` Russell King
2002-07-12 19:51 ` Andrew Morton
2002-07-12 16:02 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060812214719.GA19156@thunk.org \
--to=tytso@mit.edu \
--cc=duaneg@dghda.com \
--cc=linux-kernel@vger.kernel.org \
--cc=molle.bestefich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox