xfs-masters
[Top] [All Lists]

[xfs-masters] [Bug 723] New: xfs_repair does not fix corruption detecte

To: xfs-master@xxxxxxxxxxx
Subject: [xfs-masters] [Bug 723] New: xfs_repair does not fix corruption detected by xfs_check
From: bugzilla-daemon@xxxxxxxxxxx
Date: Fri, 13 Oct 2006 12:28:21 -0700
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=723

           Summary: xfs_repair does not fix corruption detected by xfs_check
           Product: Linux XFS
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: xfsprogs
        AssignedTo: xfs-master@xxxxxxxxxxx
        ReportedBy: vsu@xxxxxxxxxxxx


I have a filesystem which has suffered corruption from the 2.6.17
kernel bug and tried to repair it using xfsprogs-2.8.11 on an x86_64
system.

Initially xfs_check has shown these errors:

agi unlinked bucket 7 is 387655 in ag 0 (inode=387655)
bad free block nused 0 should be 5 for dir ino 11191120 block 16777216
agi unlinked bucket 36 is 275940 in ag 2 (inode=8664548)
agi unlinked bucket 32 is 730784 in ag 3 (inode=13313696)
agi unlinked bucket 21 is 1642709 in ag 4 (inode=18419925)
agi unlinked bucket 35 is 1642659 in ag 4 (inode=18419875)
agi unlinked bucket 44 is 419884 in ag 4 (inode=17197100)
agi unlinked bucket 52 is 419956 in ag 4 (inode=17197172)
agi unlinked bucket 1 is 381697 in ag 5 (inode=21353217)
agi unlinked bucket 2 is 12098 in ag 5 (inode=20983618)
agi unlinked bucket 4 is 381828 in ag 5 (inode=21353348)
agi unlinked bucket 8 is 381960 in ag 5 (inode=21353480)
agi unlinked bucket 12 is 381900 in ag 5 (inode=21353420)
agi unlinked bucket 16 is 381968 in ag 5 (inode=21353488)
agi unlinked bucket 21 is 381909 in ag 5 (inode=21353429)
agi unlinked bucket 22 is 381974 in ag 5 (inode=21353494)
agi unlinked bucket 26 is 381850 in ag 5 (inode=21353370)
agi unlinked bucket 47 is 381935 in ag 5 (inode=21353455)
agi unlinked bucket 58 is 381946 in ag 5 (inode=21353466)
agi unlinked bucket 61 is 381821 in ag 5 (inode=21353341)
link count mismatch for inode 387655 (name ?), nlink 0, counted 2
allocated inode 8664548 has 0 link count
link count mismatch for inode 13313696 (name ?), nlink 0, counted 2
allocated inode 18419875 has 0 link count
allocated inode 18419925 has 0 link count
link count mismatch for inode 17150516 (name ?), nlink 7, counted 8
link count mismatch for inode 17197100 (name ?), nlink 0, counted 1
allocated inode 17197172 has 0 link count
allocated inode 21353217 has 0 link count
allocated inode 21353341 has 0 link count
allocated inode 21353348 has 0 link count
allocated inode 21353370 has 0 link count
allocated inode 21353420 has 0 link count
allocated inode 21353429 has 0 link count
allocated inode 21353455 has 0 link count
allocated inode 21353466 has 0 link count
allocated inode 21353469 has 0 link count
allocated inode 21353480 has 0 link count
allocated inode 21353488 has 0 link count
allocated inode 21353494 has 0 link count
allocated inode 20983617 has 0 link count
allocated inode 20983618 has 0 link count
allocated inode 20983663 has 0 link count

I had run xfs_repair and got this output:

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
error following ag 5 unlinked list
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - clear lost+found (if it exists) ...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - ensuring existence of lost+found directory
        - traversing filesystem starting at / ... 
free block 16777216 for directory inode 11191120 bad nused
rebuilding directory inode 11191120
        - traversal finished ... 
        - traversing all unattached subtrees ... 
        - traversals finished ... 
        - moving disconnected inodes to lost+found ... 
disconnected dir inode 387655, moving to lost+found
disconnected inode 8664548, moving to lost+found
disconnected dir inode 13313696, moving to lost+found
disconnected dir inode 17197100, moving to lost+found
disconnected inode 17197172, moving to lost+found
disconnected inode 18419875, moving to lost+found
disconnected inode 18419925, moving to lost+found
disconnected inode 20983617, moving to lost+found
disconnected inode 20983618, moving to lost+found
disconnected inode 20983663, moving to lost+found
disconnected inode 21353217, moving to lost+found
disconnected inode 21353341, moving to lost+found
disconnected inode 21353348, moving to lost+found
disconnected inode 21353370, moving to lost+found
disconnected inode 21353420, moving to lost+found
disconnected inode 21353429, moving to lost+found
disconnected inode 21353455, moving to lost+found
disconnected inode 21353466, moving to lost+found
disconnected inode 21353469, moving to lost+found
disconnected inode 21353480, moving to lost+found
disconnected inode 21353488, moving to lost+found
disconnected inode 21353494, moving to lost+found
Phase 7 - verify and correct link counts...
cache_purge: shake on cache 0x63b0a0 left 1 nodes!?
resetting inode 387655 nlinks from 0 to 2
resetting inode 13313696 nlinks from 0 to 2
resetting inode 17197100 nlinks from 0 to 2
cache_purge: shake on cache 0x63b0a0 left 1 nodes!?
cache_purge: shake on cache 0x63b0a0 left 1 nodes!?
done

Then I mounted the filesystem and looked at lost+found - there were
some files in it, and 3 directories which looked like empty: 387655,
13313696, 17197100.  I have tried to delete one of these
directories, but got the "Directory not empty" error, and these
kernel messages:

xfs_inotobp: xfs_imap()  returned an error 22 on sda6.  Returning error.
xfs_iunlink_remove: xfs_inotobp()  returned an error 22 on sda6.  Returning 
error.
xfs_inactive:   xfs_ifree() returned an error = 22 on sda6
xfs_force_shutdown(sda6,0x1) called from line 1762 of file
fs/xfs/xfs_vnodeops.c.  Return address = 0xffffffff8811594b
Filesystem "sda6": I/O Error Detected.  Shutting down filesystem: sda6
Please umount the filesystem, and rectify the problem(s)
xfs_force_shutdown(sda6,0x1) called from line 338 of file fs/xfs/xfs_rw.c. 
Return address = 0xffffffff881195b8
xfs_force_shutdown(sda6,0x1) called from line 338 of file fs/xfs/xfs_rw.c. 
Return address = 0xffffffff881195b8

Then I umounted the filesystem and tried to run xfs_repair again,
but it did not fix the problem.

Now xfs_check finds some errors on the filesystem:

link count mismatch for inode 387655 (name ?), nlink 0, counted 2
link count mismatch for inode 13313696 (name ?), nlink 0, counted 2
link count mismatch for inode 17197100 (name ?), nlink 0, counted 2

xfs_repair seems to complete successfully:

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - clear lost+found (if it exists) ...
        - clearing existing "lost+found" inode
        - marking entry "lost+found" to be deleted
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - agno = 4
        - agno = 5
        - agno = 6
        - agno = 7
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - ensuring existence of lost+found directory
        - traversing filesystem starting at / ... 
rebuilding directory inode 128
        - traversal finished ... 
        - traversing all unattached subtrees ... 
        - traversals finished ... 
        - moving disconnected inodes to lost+found ... 
Phase 7 - verify and correct link counts...
done

However, xfs_check still finds the same errors, and the broken
directories cannot be deleted.

Here is some more information about the problematic filesystem:

# xfs_info /dev/sda6
meta-data=/dev/sda6              isize=256    agcount=8, agsize=251014 blks
         =                       sectsz=512   attr=1
data     =                       bsize=4096   blocks=2008112, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096  
log      =internal               bsize=4096   blocks=4096, version=2
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0

These directories are broken (I have renamed the lost+found directory to
"Broken", so that xfs_repair won't rebuild it every time - this did not help):

# xfs_bmap -vvl Broken/387655   
Broken/387655: no extents
# xfs_bmap -vvl Broken/13313696
Broken/13313696: no extents
# xfs_bmap -vvl Broken/17197100
Broken/17197100: no extents

-- 
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>
  • [xfs-masters] [Bug 723] New: xfs_repair does not fix corruption detected by xfs_check, bugzilla-daemon <=