Filesystem corruption using raid on RH6.0

John Finlay (finlay@moeraki.com)
Sun, 31 Oct 1999 09:50:40 -0800


I installed RH6.0 on the first 2GB of a 34GB IDE drive. The other 32GB
(save 100MB for swap) were used for a partition /dev/hda4. Another 34GB
drive was added as a slave on the same IDE contoller and partitioned
with all 34GB in /dev/hdb1.
I then created a linear raid device with the following raidtab:

raiddev /dev/md1
raid-level linear
nr-raid-disks 2
persistent-superblock 0
chunk-size 4
device /dev/hda4
raid-disk 0
device /dev/hdb1
raid-disk 1

The mkraid /dev/md1 went OK so I mke2fs'd (-m0 -b 4096) a filesystem on
/dev/md0. Took a long time but seemed to finished without error. I tried
to fsck the filesystem and it reported being clean.
But when I tried to mount the FS, I got the following errors:

Oct 30 22:45:36 curlyjoe kernel: EXT2-fs warning: mounting fs with
errors, runni
ng e2fsck is recommended
Oct 30 22:45:36 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_bloc
ks_bitmap: Wrong free blocks count for group 0, stored = 31723, counted
= 31736
Oct 30 22:45:39 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_bloc
ks_bitmap: Wrong free blocks count for group 275, stored = 31736,
counted = 2821
2
Oct 30 22:45:42 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_bloc
ks_bitmap: Wrong free blocks count in super block, stored = 16753071,
counted =
16749560
Oct 30 22:45:42 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_inod
es_bitmap: Wrong free inodes count in group 0, stored = 32757, counted =
32768
Oct 30 22:45:49 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_inod
es_bitmap: Wrong free inodes count in super block, stored = 17301493,
counted =
17301504
Oct 30 23:47:45 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_bloc
ks_bitmap: Wrong free blocks count for group 0, stored = 31723, counted
= 31736
Oct 30 23:47:48 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_bloc
ks_bitmap: Wrong free blocks count for group 275, stored = 31736,
counted = 2821
2
Oct 30 23:47:51 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_bloc
ks_bitmap: Wrong free blocks count in super block, stored = 16753071,
counted =
16749560
Oct 30 23:47:51 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_inod
es_bitmap: Wrong free inodes count in group 0, stored = 32757, counted =
32768
Oct 30 23:47:58 curlyjoe kernel: EXT2-fs error (device md(9,1)):
ext2_check_inod
es_bitmap: Wrong free inodes count in super block, stored = 17301493,
counted =
17301504

These messages appeared during the night and seem to indicate corruption
as well on the root device /dev/hda1:

Oct 31 04:02:50 curlyjoe kernel: EXT2-fs warning (device ide0(3,1)):
ext2_free_b
locks: bit already cleared for block 188418
Oct 31 04:02:50 curlyjoe kernel: EXT2-fs warning (device ide0(3,1)):
ext2_free_b
locks: bit already cleared for block 188418
Oct 31 04:02:50 curlyjoe kernel: EXT2-fs warning (device ide0(3,1)):
ext2_free_b
locks: bit already cleared for block 188428
Oct 31 04:02:50 curlyjoe kernel: EXT2-fs warning (device ide0(3,1)):
ext2_free_b
locks: bit already cleared for block 188428
Oct 31 04:02:50 curlyjoe kernel: EXT2-fs warning (device ide0(3,1)):
ext2_free_b
locks: bit already cleared for block 188431
Oct 31 04:02:50 curlyjoe kernel: EXT2-fs warning (device ide0(3,1)):
ext2_free_b
locks: bit already cleared for block 188431

I dismantled /dev/md1 and made a filesystem on /dev/hdb1. When I mounted
it I got the following messages:

Oct 31 09:25:54 curlyjoe kernel: EXT2-fs error (device ide0(3,65)):
ext2_check_b
locks_bitmap: Wrong free blocks count for group 0, stored = 31728,
counted = 317
41
Oct 31 09:25:54 curlyjoe kernel: EXT2-fs error (device ide0(3,65)):
ext2_check_b
locks_bitmap: Wrong free blocks count for group 20, stored = 31741,
counted = 41
52
Oct 31 09:25:57 curlyjoe kernel: EXT2-fs error (device ide0(3,65)):
ext2_check_b
locks_bitmap: Wrong free blocks count in super block, stored = 8637691,
counted
= 8610115
Oct 31 09:25:57 curlyjoe kernel: EXT2-fs error (device ide0(3,65)):
ext2_check_i
nodes_bitmap: Wrong free inodes count in group 0, stored = 32661,
counted = 3267
2
Oct 31 09:26:00 curlyjoe kernel: EXT2-fs error (device ide0(3,65)):
ext2_check_i
nodes_bitmap: Wrong free inodes count in super block, stored = 8919445,
counted
= 8919456

The OS is:

Oct 30 16:06:41 curlyjoe kernel: Linux version 2.2.5-15smp
(root@porky.devel.red
hat.com) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release))
#1 SMP M
on Apr 19 22:03:51 EDT 1999

Would this problem go away if I upgraded to a newer version of the OS?

Thanks

John

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/