Skip to contentSkip to conversation

2.4.15 + fs corruption.

DISCUSSION Jahn Veach 3 participants 3 messages Nov 23, 2001 – Nov 24, 2001

lore
Share & tools
lore

Jahn Veach

author
#0 lore raw
Quoted 2 lines

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?

#1 lore raw
Quoted 3 lines · Jahn Veach

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

#2 lore raw
In reply to Jahn Veach
Quoted 6 lines · Jahn Veach
Quoted 2 lines

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/