On Tue, Jul 19, 2005 at 05:43:43PM -0400, Ariel wrote:
> 
> Is there any combination of inode parameters that could cause this? (i.e. 
> fsck needs to be run twice, never mind how the fs got there?) It looks to 
> my uneducated eye that the only real error is that i_links_count was 0 
> instead of 1, change just that and all the other errors would have gone 
> away.
> 

Right.  But if this inode was the journal inode, much earlier it would
have complained that the journal was invalid, and cleared it during
the first run of e2fsck.  The wierd thing is that first run of e2fsck
didn't complain about this, but the second run of e2fsck _did_.  That
should never happen, unless the device is broken and returning
different data each time.

> I tested this using debugfs to change the link count. And I got an even 
> stranger result: fsck.ext3 finds no errors, but I can't mount it!

I can't replicate this.  Is d1.img supposed to be this image file that
was supposedly showing this problem?

<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
579# /usr/projects/e2fsprogs/e2fsprogs-1.37-2/e2fsck/e2fsck -f -y d1
e2fsck 1.37 (21-Mar-2005)
Superblock has a bad ext3 journal (inode 18).
Clear? yes

*** ext3 journal has been deleted - filesystem is now ext2 only ***

Superblock doesn't have has_journal flag, but has ext3 journal inode.
Clear? yes

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

/boot: ***** FILE SYSTEM WAS MODIFIED *****
/boot: 43/120 files (18.6% non-contiguous), 13089/23104 blocks

I also tried generating the d1.img file by following your receipe, and
I don't get these results.  E2fsck reports the following when I run
your sequence of commands:

<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
553# bunzip2 < /tmp/d.bz2 > d
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
554# tune2fs -O ^has_journal d
tune2fs 1.38 (30-Jun-2005)
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
555# mount -o loop d /mnt
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
556# losetup /dev/loop0
/dev/loop0: [0303]:7913565 (d)
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
557# tune2fs -j /dev/loop0
tune2fs 1.38 (30-Jun-2005)
Creating journal inode: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
558# umount d
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
559# cp d d1
/bin/cp: overwrite `d1'? y
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
560# debugfs -w d1
debugfs 1.38 (30-Jun-2005)
debugfs:  mi .journal
                          Mode    [0100600]
                       User ID    [0]
                      Group ID    [0]
                          Size    [1048576]
                 Creation time    [1121998171]
             Modification time    [1121998171]
                   Access time    [1121808381]
                 Deletion time    [0]
                    Link count    [1] 0
                   Block count    [2058]
                    File flags    [0x50]
                    Generation    [0x69e95ea8]
                      File acl    [0]
           High 32bits of size    [0]
              Fragment address    [0]
               Fragment number    [0]
                 Fragment size    [0]
               Direct Block #0    [5292]
               Direct Block #1    [5293]
               Direct Block #2    [5294]
               Direct Block #3    [5295]
               Direct Block #4    [5296]
               Direct Block #5    [6437]
               Direct Block #6    [6438]
               Direct Block #7    [6439]
               Direct Block #8    [6440]
               Direct Block #9    [6441]
              Direct Block #10    [6442]
              Direct Block #11    [6443]
                Indirect Block    [6444]
         Double Indirect Block    [6701]
         Triple Indirect Block    [0]
debugfs:
debugfs:  quit
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
561# /usr/projects/e2fsprogs/e2fsprogs-1.37-2/e2fsck/e2fsck -f -y d1
e2fsck 1.37 (21-Mar-2005)
Superblock has a bad ext3 journal (inode 18).
Clear? yes

*** ext3 journal has been deleted - filesystem is now ext2 only ***

Superblock doesn't have has_journal flag, but has ext3 journal inode.
Clear? yes

Pass 1: Checking inodes, blocks, and sizes
Deleted inode 18 has zero dtime.  Fix? yes

Pass 2: Checking directory structure
Entry '.journal' in / (2) has deleted/unused inode 18.  Clear? yes

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(5292--5296) -(6437--7215) -(7237--7481)
Fix? yes

Free blocks count wrong for group #0 (2495, counted=3524).
Fix? yes

Free blocks count wrong (8986, counted=10015).
Fix? yes

Inode bitmap differences:  -18
Fix? yes

Free inodes count wrong for group #0 (4, counted=5).
Fix? yes

Free inodes count wrong (76, counted=77).
Fix? yes


/boot: ***** FILE SYSTEM WAS MODIFIED *****
/boot: 43/120 files (18.6% non-contiguous), 13089/23104 blocks
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
562# /usr/projects/e2fsprogs/e2fsprogs-1.37-2/e2fsck/e2fsck -f -y d1
e2fsck 1.37 (21-Mar-2005)
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
/boot: 43/120 files (18.6% non-contiguous), 13089/23104 blocks
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
563# mount -o loop d1 /mnt
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
564# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
proc /proc proc rw,nodiratime 0 0
sysfs /sys sysfs rw 0 0
/dev/root /dev/.static/dev ext3 rw 0 0
tmpfs /dev tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/hda3 /usr ext3 rw 0 0
/dev/hda4 /debian ext3 ro 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
tmp /tmp tmpfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/loop0 /mnt ext2 rw 0 0
<[EMAIL PROTECTED]>      {/usr/var/tmp}, level 2
565# umount /mnt


So it works just fine for me, but it is mounted as an ext2 filesystem.
If you don't have an ext2 compiled, then you will get an error, even
if the filesystem passes the e2fsck check.  Maybe that's what you saw,
but e2fsck should have printed the message:

e2fsck 1.37 (21-Mar-2005)
Superblock has a bad ext3 journal (inode 18).
Clear? yes

*** ext3 journal has been deleted - filesystem is now ext2 only ***

The fact that it didn't makes me wonder if your e2fsck is screwed up
somehow.  

Out of curiosity, why are you running e2fsprogs 1.37-2?  The sarge
version is e2fsprogs 1.37sarge2, and the unstable version is 1.38-1.
I can recreate 1.37-2 from my SCM, but I'm curious why you are using
it.

                                                        - Ted


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

Reply via email to