Skip to contentSkip to conversation

Better fsck.reiser4 needed

DISCUSSION Joe Feise 3 participants 4 messages Sep 6, 2006

lore
Share & tools
lore

Joe Feise

author
#0 lore raw

Hi,

It seems that fsck.reiser4 -a doesn't do anything. It doesn't even detect corruption.
I had a /var corruption (reiser4 on /var) over the weekend, and since I was out of town, the machine was hanging trying to go into multi-user mode for a day before I could fix the corruption manually. An fsck that actually would do some automatic repairs (e.g., like ext3 which I use as the root partition) would be really helpful.
For now, I have resorted to --fix -y at bootup time for all my reiser4 partitions, but that's just a quick hack, and rather unsatisfactory.

Cheers,
-Joe

#1 lore raw

Hello

Quoted 4 lines · Joe Feise

Hi,

It seems that fsck.reiser4 -a doesn't do anything. It doesn't even detect corruption.

I think it is made that way with intention. If fsck.reiser4 -a did corruption detection bootup process would take long time and users would not have the main advantage of journalled filesystems - quick recovering after unclean shutdown.

Quoted 2 lines

I had a /var corruption (reiser4 on /var) over the weekend, and since I was out of town, the machine was hanging trying to go into multi-user mode

I guess here you got reiser4 bug where it hanged trying to access corrupted partition instead of returning -EIO. Was there anything interesting in logs and have you managed to catch them?

Quoted 9 lines

for
a day before I could fix the corruption manually. An fsck that actually would do some automatic repairs (e.g., like ext3 which I use as the root partition) would be really helpful.
For now, I have resorted to --fix -y at bootup time for all my reiser4 partitions, but that's just a quick hack, and rather unsatisfactory.

Cheers,
-Joe

author
#2 lore raw

Vladimir V. Saveliev wrote on 09/06/06 02:04:

Quoted 6 lines
Quoted 2 lines

I had a /var corruption (reiser4 on /var) over the weekend, and since I was out of town, the machine was hanging trying to go into multi-user mode

I guess here you got reiser4 bug where it hanged trying to access corrupted partition instead of returning -EIO. Was there anything interesting in logs and have you managed to catch them?

Unfortunately, I didn't get any logs, since they are on the corrupted /var.

-Joe

#3 lore raw
In reply to Vladimir V. Saveliev
Quoted 8 lines · Vladimir V. Saveliev
Quoted 2 lines · Joe Feise

It seems that fsck.reiser4 -a doesn't do anything. It doesn't even detect corruption.

I think it is made that way with intention. If fsck.reiser4 -a did corruption detection bootup process would take long time and users would not have the main advantage of journalled filesystems - quick recovering after unclean shutdown.

In e2fsck the boot-time check (-a) of ext3 only does very minimal checking:
- valid superblock
- valid journal superblock
- recover journal and any errors stored in the journal, transfer to superblock
- reverify superblock
- check if superblock recorded any metadata errors previously

At this point less than a second has normally passed and the e2fsck is done. The kernel ext3 code can also do journal recovery, but this doesn't allow e2fsck the chance to verify the superblock after the journal is recovered.

If the journal or filesystem superblock recorded an error in the filesystem during the previous run (generally corruption of the metadata) or is itself corrupt e2fsck will force a full check. Otherwise, this corruption may cause endless panic+reboot cycles, or may lead to cascading corruption of the rest of the filesystem (e.g. if allocation bitmaps are corrupted).

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.