Header Shadow Image


Corruption warning: Metadata has LSN (6:49052) ahead of current LSN (6:49006). Please unmount and run xfs_repair (>= v4.3) to resolve.

If you get the above, do the following ( Substitute LV for a real disk such as /dev/sdb in case the device has no Logical Volumes ) :

  1. Mount the latest ISO with the latest xfsprogs package installed that matches the OS vendor you've used on the failed system.  We don't want to fix a v4 XFS with a v3 xfs_repair tool.  That won't work.  In fact, it can damage things further.  Use the ISO Troubleshooting / Recovery options.

     

    # xfs_repair -V
    xfs_repair version 4.5.0

  2. Check if the LVM is visible with ls –altri /dev/mapper/<LV>
     
  3. Ensure the device you're working with is a real XFS filesystem.  For example:
    blkid /dev/sdb
    /dev/sdb: UUID="0dc8ade8-d1e0-41e3-a4ee-6a06ba8c0b0c" TYPE="xfs"

     
  4. If LV is not available, issue
    vgscan -v –mknodes
     
  5. Next issue the following to active the volumes:
    vgchangea y
     
  6. (Optional) Try xfs_check <LVM> if it's available.  Not to worry if it's not, simply issue:
    xfs_repair -n <LVM>
     
  7. Review the output.  Issue the repair if nothing worries you about the above output:
    xfs_repair <LVM>
     
  8. While repairing, it may tell you to mount the LV to replay the latest journal.  Do that by creating a temporary folder in your current path and mounting the LV on it. (See below for the exact message)
     
  9. Reissue the xfs_repair.
     
  10. Attempt to reboot or remount if the partition is not a boot partition.
     
  11. If this still fails, issue log zeroing alongside the repair:
    xfs_repair -L <LV>
     
  12. Attempt to remount the volume or reboot once more.
     
  13. With luck, your volume will return to normal.  Feel free to post below if not.
     

ISSUES

These are the messages in dmesg / messages log files pertaining to this resolution above:

[  249.827365] XFS (sdb): Mounting V5 Filesystem
[  250.338544] XFS (
sdb): Corruption warning: Metadata has LSN (6:49052) ahead of current LSN (6:49006). Please unmount and run xfs_repair (>= v4.3) to resolve.
[  250.338551] XFS (
sdb): log mount/recovery failed: error -22
[  250.338675] XFS (
sdb): log mount failed
[  270.797534] XFS (
sdb): Mounting V5 Filesystem
[  271.020270] XFS (
sdb): Corruption warning: Metadata has LSN (6:49052) ahead of current LSN (6:49006). Please unmount and run xfs_repair (>= v4.3) to resolve.
[  271.020277] XFS (
sdb): log mount/recovery failed: error -22
[  271.020398] XFS (
sdb): log mount failed
[root@nfs01 ~]# 

 

SAMPLE OUTPUT


[root@nfs01 ~]# xfs_repair -L /dev/sdb
Phase 1 – find and verify superblock…
Phase 2 – using internal log
        – zero
log
ALERT: The filesystem has valuable metadata changes in a log which is being
destroyed because the -L option was used.
        – 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
        – process newly discovered inodes…
Phase 4 – check for duplicate blocks…
        – setting up duplicate extent list…
        – check for inodes claiming duplicate blocks…
        – agno = 0
        – agno = 1
        – agno = 2
        – agno = 3
Phase 5 – rebuild AG headers and trees…
        – reset superblock…
Phase 6 – check inode connectivity…
        – resetting contents of realtime bitmap and summary inodes
        – traversing filesystem …
        – traversal finished …
        – moving disconnected inodes to lost+found …
Phase 7 – verify and correct link counts…
Maximum metadata LSN (6:49052) is ahead of log (1:2).
Format log to cycle 9.
done
[root@nfs01 ~]#

KERNEL PANIC ERRORS

NOTE: Below was interpreted from an image.  Misinterpretations may be possible.

[2.078627] scsi 2:0:0:0: CD-ROM  NECVMWar VMware IDE CDR10 1.00 PQ: 0 ANSI: 5

[2.114948] sr 2:0:0:0: [sr0] scsi3-mmc drive: lx/lx writer dvd-ram cd/rw xa/form2 cdda tray

[2.114955] cdrom: Uniform CD-ROM driver Revision: 3.20

[2.115173] sr 2:0:0:0: Attached scsi CD-ROM sr0

[2.675030] random: fast init done

[2.948289] SGI XFS with ACLs, security attributes, no debug enabled

[2.952011] XFS (dm-0): Mounting V4 Filesystem

[3.450106] random: crng init done

[3.648589] XFS (dm-0): Starting recovery (logdev: internal)

[3.904070] XFS (dm-0): Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c. Caller xfs_free_extent.0xfc/0x130 [xfs]

[3.904162] CPU: 2 PID: 412 Comm: mount Not tainted 3.10.0-693.21.1.e17.x86_64 #1

[3.904165] Hardware name: IUMware, Inc. VMWare Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/14/2014

[3.904167] Call Trace:

[3.904177] [<ffffffff816ae7c8>1 dump_stack+0x19/0x1b

[3.904203] [1 xfs_error_report+0x3b/0x40 [xfs]

[3.904220] [1 ? xfs_free_extent+Oxfc/0x130 [xfs]

[3.904239] [1 xfs_free_ag_extent+Ox20a/0x780 [xfs]

[3.904283] [1 xfs_free_extent+Oxfc/0x130 [xfs]

[3.904313] [1 xfs_trans_free_extent+0x26/0x60 [xfs]

[3.904344] [1 xlog_recover_process_efi+Oxl7e/Ox1c0 [xfs]

[3.904372] [1 xlog_recover_process_efis.isra.30+0x77/0xe0 [xfs]

[3.904401] [1 xlog_recover_finish+0x21/OxbO [xfs]

[3.904429] [1 xfs_log_mount_finish+0x34/0x50 [xfs]

[3.904457] [1 xfs_mountfs+0x5d1/0x8c0 [xfs]

[3.904482] [1 ? xfs_filestream_get_parent+0x80/0x80 [xfs]

[3.904510] [1 xfs_fs_fill_super+0x3b3/0x4d0 [xfs]

[3.904516] [<ffffffff812096a3A mount_bdev+0x1b3/0x1f0

[3.904543] [1 ? xfs_test_remount_options.isra.11+0x70/0x70 [xfs]

[3.904571] [

[3.904576] [<ffffffff81209fle>1 mount_fs+0x3e/0x1b0

[3.904580] [<ffffffff811aa685>1 ? alloc_percpu+0x15/0x20

[3.904585] [<ffffffff81226d57>1 vfs_kern_mount+0x67/0x110

[3.904589] [<ffffffff81229263>1 do_mount+0x233/0xaf0

[3.904594] [<ffffffff811a55bb>1 ? strndup_user+0x4b/Oxa0

[3.904597] Uffffffff81229ea6A SyS_mount+0x96/0xf0

[3.904603] Uffffffff816c0715>1 system_cal1_fastpath+Oxlc/0x21

[3.904607] Uffffffff816c0661>1 ? system_call_after_swapgs+Oxae/0x146

[3.904657] XFS (dm-0): Internal error xfs_trans_cancel at line 984 of file fs/xfs/xfs_trans.c. Caller xlog_recover_process_efi+0x18e/0x1c0 (xfs]

[3.904737] CPU: 2 PID: 412 Comm: mount Not tainted 3.10.0-693.21.1.e17.x86_64 #1

[3.904739] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/14/2014

[3.904741] Call Trace:

[3.904746] Uffffffff816ae7c8>1 dump_stack+0x19/0x1b

[3.904774] Uffffffffc024705b>1 xfs_error_report+Ox3b/0x40 [xfs]

[3.904802] Uffffffffc026d7ce>1 ? xlog_recover_process_efi+Oxl8e/Ox1c0 [xfs]

[3.904830] Uffffffffc026357d>1 xfs_trans_cancel+Oxbd/Oxe0 [xfs]

[3.904859] Uffffffffc026d7ce>1 xlog_recover_process_efi+0x18e/Oxlc0 [xfs]

[3.904888] Uffffffffc026fb47>1 xlog_recover_process_efis.isra.30+0x77/0xe0 [xfs]

 

sh-4.211 xfs_repair /dev/mapper/centos-root
Phase 1 – find and verify superblock…
Phase 2 – using internal log – zero log…
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_repair. If you are unable to mount the filesystem, then use the -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.
 

 

Thanks,
TK

REF: Interpreter used: https://www.onlineocr.net/

 


     
  Copyright © 2003 - 2013 Tom Kacperski (microdevsys.com). All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License