2001-11-23 22:46:42

by Justin Piszcz

[permalink] [raw]
Subject: 2.4.15 + fs corruption.

Is 2.4.15 ok to use?
Many people are experiencing filesystem corruption?

As long as you patch the kernel with Al Viro's patch it should be ok,
right?


2001-11-23 22:57:03

by Alexander Viro

[permalink] [raw]
Subject: Re: 2.4.15 + fs corruption.



On Fri, 23 Nov 2001, war wrote:

> Is 2.4.15 ok to use?
> Many people are experiencing filesystem corruption?
>
> As long as you patch the kernel with Al Viro's patch it should be ok,
> right?

In theory. Again, as a workaround - sync before umount (and don't boot
unpatched 2.4.15/2.4.15-pre9 again, obviously).

Breakage happens when you umount filesystem (_any_ local filesystem, be
it ext2, reiserfs, whatever) that still has dirty inodes.

IOW, if you are running 2.4.15 - build a patched kernel, install it and
do the following:
* switch to single-user
* sync
* umount everything non-buys
* remount the rest read-only
* turn the thing off
* boot with patched kernel or with anything before 2.4.15-pre9

2001-11-23 23:10:42

by Alexander Viro

[permalink] [raw]
Subject: Re: 2.4.15 + fs corruption.



On Fri, 23 Nov 2001, Alexander Viro wrote:

> * umount everything non-buys

Grrr... non-busy, that is.

2001-11-23 23:50:25

by Jahn Veach

[permalink] [raw]
Subject: Re: 2.4.15 + fs corruption.

> Breakage happens when you umount filesystem (_any_ local filesystem, be
> it ext2, reiserfs, whatever) that still has dirty inodes.

What kind of breakage are we looking at here? I had a system that ran 2.4.15
and got shut down without a sync. What kind of corruption will occur and is
it something a simple fsck will fix?

2001-11-23 23:56:46

by Russell King

[permalink] [raw]
Subject: Re: 2.4.15 + fs corruption.

On Fri, Nov 23, 2001 at 05:50:03PM -0600, Jahn Veach wrote:
> What kind of breakage are we looking at here? I had a system that ran 2.4.15
> and got shut down without a sync. What kind of corruption will occur and is
> it something a simple fsck will fix?

fsck does seem to fix it, but it won't automatically detect the problem
(since the filesystem is marked clean).

It basically removes the inodes from the disk, but leaves the names in
the directory. On the next boot, init scripts which clear out certain
directories fail, and various daemons fail to start because of it.

It seems that the only solution is to force a fsck at boot:

shutdown -F -r now

should do the trick.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2001-11-24 00:15:28

by Andreas Dilger

[permalink] [raw]
Subject: Re: 2.4.15 + fs corruption.

On Nov 23, 2001 17:50 -0600, Jahn Veach wrote:
> > Breakage happens when you umount filesystem (_any_ local filesystem, be
> > it ext2, reiserfs, whatever) that still has dirty inodes.
>
> What kind of breakage are we looking at here? I had a system that ran 2.4.15
> and got shut down without a sync. What kind of corruption will occur and is
> it something a simple fsck will fix?

Well it appears to leave inodes around which do not point at existing files.
It is easy to fix on ext2/ext3, but may be harder for reiserfs. Maybe
reiserfs shows the problem differently, though, I don't know.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/