Re: [XFS BUG] xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed:Structure needs cleaning

From: Dave Chinner
Date: Wed Dec 18 2013 - 17:33:39 EST


On Wed, Dec 18, 2013 at 04:00:42PM +0100, arno wrote:
> Hello,
>
> (Please keep me in CC, I'm not subscribed)
>
> Just got "xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Structure
> needs cleaning" when trying to grow a logical Volume. Sorry, I lost the
> xfs_growfs output.
>
> After collecting some info, I ran xfs_repair, and that seemed to fix it,
> so no harm done. After fixing, the FS had the new, increased size, if
> that matters.

This isn't the first time you've grown the filesystem, is it?

On older kernels, growfs could leave trailing garbage in the new
secondary superblocks it created. This was fixed in kernel v3.8 by
commit:

1375cb6 xfs: growfs: don't read garbage for new secondary superblocks

This garbage is detected by other changes made in v3.8 that verify
the secondary superblocks as they are read.

9802182 xfs: verify superblocks as they are read from disk

So if you grew the filesystem on a kernel older than v3.8, growing
it again on a v3.8+ kernel will detect the superblock corruption and
throw this error.

xfs_repair was recently fixed to detect the garbage in secondary
superblocks and zero it:

cbd7508 xfs_repair: zero out unused parts of superblocks

So what you need to do is run xfs_repair built from the development
git tree and run it on your filesystem. That will remove the garbage
from the superblocks and make this problem go away forever.

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/