corrupt file system -- "Structure needs cleaning"
Eric Sandeen
sandeen at sandeen.net
Fri Jun 26 15:17:59 CDT 2009
Hendrik Hoeth wrote:
> Hi,
>
> I'm running linux-2.6.29.3 on a VIA Esther CPU. The harddisk is fully
> encrypted using dm-crypt, and inside the encryption I have LVM with my
> actual partitions. The file system is XFS, I have xfsprogs-2.9.4-1.
>
> I was copying some large files when I got these errors (and yes, I own
> that music CD ;-)):
>
> -------------------8<---------------------
> cp: cannot create regular file
...
> [14:36] hoeth at jetway:~/Musik/DONE $ ls
> ls: cannot open directory .: Input/output error
> [14:36] hoeth at jetway:~/Musik/DONE $
> -------------------8<---------------------
>
> So at this point I realised that the filesystem was shut down.
Yep
> Here's what I see in the logfiles:
>
> -------------------8<---------------------
> Jun 26 14:35:44 jetway kernel: Filesystem "dm-5": XFS internal error xfs_btree_check_sblock at line 124 of file fs/xfs/xfs_btree.c. Caller 0xc02201ac
This is an internal consistency check failing
> -------------------8<---------------------
>
> This is how I recovered (well, most of the data I had copied is
> corrupt at the target location):
>
> -------------------8<---------------------
> [14:40] root at jetway:/var/log # umount /home
> [14:43] root at jetway:/var/log # xfs_check /dev/mapper/hda_crypt_vg-home
> ERROR: The filesystem has valuable metadata changes in a log which needs to
> be replayed. Mount the filesystem to replay the log, and unmount it before
> re-running xfs_check. If you are unable to mount the filesystem, then use
> the xfs_repair -L option to destroy the log and attempt a repair.
> Note that destroying the log may cause corruption -- please attempt a mount
> of the filesystem before doing this.
> [14:43] root at jetway:/var/log # mount /home/
> [14:43] root at jetway:/var/log # umount /home/
> [14:44] root at jetway:/var/log # xfs_check /dev/mapper/hda_crypt_vg-home
xfs_check doesn't actually fix anything; I'd run xfs_repair. Use -n
first if you want to see what it would do.
If it doesn't find anything, then I guess you had some in-memory corruption.
-Eric
More information about the xfs
mailing list