Package: e2fsprogs
Version: 1.41.8-1
Severity: important

e2fsck -D sometimes corrupts healty ext4 file systems.  On one
real file system it produces plenty of messages of this form:

  Failed to optimize directory /sandbox/fftw3/dft/simd/codelets (58006): No 
'next' extent

After running e2fsck, the file system still has errors and certain
file names become corrupted.  Specifically, file FOO tends to be
corrupted as FOO~0.

I have managed to create a small test case that is farly reproducible
on my system.  Here are the steps:

# create 30G file system
amd:~# lvcreate -L 30G -n test amd
  Logical volume "test" created

amd:~# mkfs.ext4  /dev/mapper/amd-test    
amd:~# mount -o noatime /dev/mapper/amd-test /mnt
amd:~# cd /mnt

# populate with 10 copies of linux kernel tree.
# The tree is at commit 78af08d90b8f745044b1274430bc4bc6b2b27aca
# (probably this does not matter)

amd:/mnt# for i in `seq 1 10`; do mkdir $i; (cd $i && git clone 
/scratch/athena/sandbox/linux-2.6); done

# prove that the file system is healthy

amd:~# umount /mnt

amd:~# e2fsck -f -n  /dev/mapper/amd-test 
e2fsck 1.41.8 (11-July-2009)
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
/dev/mapper/amd-test: 309311/1966080 files (0.1% non-contiguous), 
1956119/7864320 blocks

# the corruption happens here:

amd:~# e2fsck -f -D  /dev/mapper/amd-test 
e2fsck 1.41.8 (11-July-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #0 (15584, counted=15580).
Fix<y>? yes

Free blocks count wrong for group #16 (16754, counted=16750).
Fix<y>? 

After this, the file system is completely corrupted and 
e2fsck is completely unable to repair it.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'stable'), (10, 'experimental'), (10, 
'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages e2fsprogs depends on:
ii  e2fslibs                      1.41.8-1   ext2/ext3/ext4 file system librari
ii  libblkid1                     1.41.3-1   block device id library
ii  libc6                         2.9-12     GNU C Library: Shared libraries
ii  libcomerr2                    1.41.3-1   common error description library
ii  libss2                        1.41.3-1   command-line interface parsing lib
ii  libuuid1                      1.41.3-1   universally unique id library

e2fsprogs recommends no packages.

Versions of packages e2fsprogs suggests:
pn  e2fsck-static                 <none>     (no description available)
pn  gpart                         <none>     (no description available)
pn  parted                        <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to