-D introduces corruption in directories
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: e2fsprogs
Package: e2fsprogs
Version: 1.41.10-1ubuntu1
Running "e2fsck -D" introduces corruption in one of my filesystems (ext4).
This Friday after deleting/
Today, for no particular reason, I ran the filesystem check again [FSCK 2] (after using the filesystem, and, after adding the directory "/kosh/
e2fsck 1.41.10 (10-Feb-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
First entry ' YYY YYYYYYY YYYY YYY' (inode=13369382) in directory inode 13369351 (/kosh/
Fix<y>? no
[note the whitespace (0x20) as the first character of YYY*]
Invalid inode number for '.' in directory inode 13369351.
Fix<y>? no
Directory entry for '.' in /kosh/.
Split<y>? no
Second entry '.' (inode=13369351) in directory inode 13369351 should be '..'
Fix<y>? no
Entry '..' in /kosh/.
Fix<y>? no
Entry '..' in /kosh/.
Fix<y>? no
Entry '..' in /kosh/.
Clear<y>? no
[This is correct, .. is a link to the parent directory. There was a second pair of directory+
Pass 3: Checking directory connectivity
'..' in /kosh/.
Fix<y>? no
Unconnected directory inode 13369382 (.../ YYY YYYYYYY YYYY YYY)
Connect to /lost+found<y>? no
'..' in ... (13369382) is /kosh/.
Fix<y>? no
Pass 3A: Optimising directories
^C^CDATA: e2fsck cancelled.
DATA: ***** FILE SYSTEM WAS MODIFIED *****
DATA: ********** WARNING: Filesystem still has errors **********
Oh my, so it modified the filesystem (the directory optimisation was done).
I mounted it and looked at the files, everything seemed to be okay. I unmounted and performed the same check again [FSCK 3], with the intention of just hitting 'y', this time. But I didn’t, because apparently the optimisation had introduced a new error:
e2fsck 1.41.10 (10-Feb-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
First entry '#spam&
Fix<y>? Quit
This is quite interesting, because I have put the directory tree there between FSCK 1 and FSCK 2, and I didn’t do much between FSCK 2 and FSCK 3, so the error must have been introduced by FSCK 2.
This time, the problematic entry has "#" as first character and is not a directory. In a directory listing, both " " and "#" sort before "." and "..", so maybe that’s the problem.
Will “fixing” the first entry not being . remove that entry or put it somewhere else?
kosh@isis:~$ sudo lsb_release -rd
Description: Ubuntu lucid (development branch)
Release: 10.04
kosh@isis:~$ uname -a
Linux isis 2.6.33-
“Fixing” it causes the directory entry to be lost (and found, but its name is gone).