[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Ext3fs and fsck



Alan Shutko wrote:

>You can replay the journal.  That helps you if the filesystem is
>unclean because the system crashed.  It doesn't help you _at all_ if
>the filesystem was silently corrupted because of a bad cable, or
>because the drive is going bad, or because of a bug in your kernel, or
>any other of a number of causes.  

True. It's just that it takes too long on a very large hard drive.
That's why I had resorted to turning that function off then do it
via a script (tedious and repetitive effort, as most will say) to be
ran by cron.
However, you presented a better point by recommending the change
of intervals.

>The maximal mount count forced fsck is intended to find these problems
>before the filesystem is so corrupted that they're found during run
>time, by which time data loss has occured, and the journal can do
>nothing about it.

True. The journal records full data info, but it takes an fsck to
find the problems that aren't committed or reflected in the journal.
(aside from prying your hardware open then...)

>Doing an extra fsck every month or two is not a bad thing.  Even >with per-mount interval and time-based interval checking enabled, >most mounts will simply replay the journal.

I agree. It's not being paranoid to have extra checks. It's just
doing the job and making sure of doing it right.

Anyway, the journal records the data info when data is flushed to the 
disk. Mounting a filesystem to the hierarchy will cause the journal
to replay, as the system prepares the disk for data I/O, to begin on
a new entry upon data commit to disk.

>I bet you recommend that sysadmins turn off cron and do everything by
>hand, too.

Nah, I dont. That's why the scripts (can be run by cron too...).
Quite too tedious and needlessly repetitive, if you'll agree, and
as I've recognized by pondering on your argument, such is
already inherent in the system.

>What you do on your own machine is your own business, but I think it
>inappropriate to recommend to others that they drive without their
>safety belts fastened.  The ext3 maintainers agree.
><URL:http://www.redhat.com/mailing-lists/ext3-users/msg01777.html>

>So change the interval, don't get rid of it.  And don't reboot so
>often.  8^)

Good point! It is highly recommended therefore to just change the
interval rather than risk it all unsafely. (Won't recommend turning
off cron too. That's why I recommended a script or a /forcefsck
file as earlier mentioned in this thread). Anyway, we can't avoid
the hardware considerations that makes a forced fsck upon
reaching the maximum count recommended (as you mentioned).  I'll agree to your proposition as indeed the best solution for this kind
of dilemma.

(btw: I delete only the .journal file when i mount it as ext2.
haven't tried deleting that when mounted as ext3. When you mount
an ext3fs as ext3/not ext2, you lose the backward compatibility
to ext2, since the kernel needs to explicitly know what FS to
mount, and as far as the kernel is concerned, ext2 != ext3. losing an
important inode in ext3 will mean corruption of the filesystem, since
ext3 depends much on the journal, while maintaining compatibility
to ext2, if it is mounted as ext2. to the kernel, ext3 is ext3 if
it finds a journal inode. mounting it as ext2 won't make the kernel
search for the journal inode. the filesystem would take care of
the rest given it being configured to use the journal, if I remember
right...)

Paolo Alexis Falcone

__________________________________
www.edsamail.com



Reply to: