new fs, xfs_admin new label, metadata corruption detected

Dave Chinner david at fromorbit.com
Thu Mar 17 15:57:29 CDT 2016


On Wed, Mar 16, 2016 at 08:39:21PM -0600, Chris Murphy wrote:
> OK I can consistently reproduce this on the CLI. I end up with totally different
> 
> # lvcreate -L 40g VG -n testxfs
>   Logical volume "testxfs" created.
....
[grow]
....
> # xfs_repair -n /dev/VG/testxfs
> Phase 1 - find and verify superblock...
> Phase 2 - using internal log
>         - zero log...
>         - scan filesystem freespace and inode maps...
> Metadata corruption detected at xfs_agf block 0x8c00008/0x1000
> fllast 1014 in agf 7 too large (max = 1014)
> Metadata corruption detected at xfs_agf block 0x6400008/0x1000
> fllast 1014 in agf 5 too large (max = 1014)
> Metadata corruption detected at xfs_agf block 0x5000008/0x1000
> fllast 1014 in agf 4 too large (max = 1014)
> Metadata corruption detected at xfs_agf block 0x7800008/0x1000
> fllast 1014 in agf 6 too large (max = 1014)
>         - found root inode chunk

That's caused by commit 96f859d ("libxfs: pack the agfl header
structure so XFS_AGFL_SIZE is correct") and growfs setting the
last free list entry to something that a userspace without the
commit  9fccb9f ("libxfs: pack the agfl header structure so
XFS_AGFL_SIZE is correct") fails to validate correctly.

i.e. update userspace to 4.5.0, and the repair noise will go away.

I think we probably need to fix the growfs code to set it's initial
flfirst/fllast values to be 1/0, not 0/EOFL, and the problem will
then go away....

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list