Subject: e2fsck from sysutils/e2fsprogs cannot validate new file system
To: None <netbsd-users@NetBSD.org>
From: Klaus Heinz <k.heinz.jul.sechs@onlinehome.de>
List: netbsd-users
Date: 07/13/2006 11:38:16
Hi,

I cannot get e2fsck from pkgsrc/sysutils/e2fsprogs to check a file system
on a new ATA disk with NetBSD/i386 3.0_STABLE. This happens with both
e2fsprogs-1.32 from pkgsrc as well as with e2fsprogs-1.38 from
sourceforge.

  $ mke2fs /dev/rwd1a
  ...
  $ e2fsck -f -y /dev/rwd1a
  Pass 1: Checking inodes, blocks, and sizes
  Pass 2: Checking directory structure
  Pass 3: Checking directory connectivity
  Pass 4: Checking reference counts
  Pass 5: Checking group summary information
  Error reading block 4 (Attempt to read block from file system resulted in
  short read) while reading inode and block bitmaps.  Ignore error<y>? yes

  Force rewrite<y>? yes

  Error reading block 8196 (Attempt to read block from filesystem resulted
  in short read) while reading inode and block bitmaps.  Ignore error<y>?
  yes

  Force rewrite<y>? yes
  ...

With ktruss I can see where the problem happens:

  1565 e2fsck   read(0x3, 0x8095600, 0x9d)         Err#22 EINVAL

but I am stumped why this should happen at all. If I copy this file
system to a file with dd, e2fsck has no problems checking that file. On
the other hand, fsck_ext2fs from NetBSD can check the file system on the
disk and in a file without any problems.

Has anyone ever seen something like this?

ciao
     Klaus