xfs_repair 不会根据 xfs_repair -n 修复文件系统

xfs_repair 不会根据 xfs_repair -n 修复文件系统

我有一个文件系统,根据 崩溃后,该文件系统已损坏xfs_repair -n。如页面中所述xfs_repair manxfs_repair -n如果检测到损坏,则存在并返回状态 1。所以我xfs_repair在文件系统上运行然后xfs_repair -n再次运行。退出状态仍然是 1。

根据用于 Linux 管理的 XFS 第 4 章最多可能需要xfs_repair运行三次才能解决所有问题。我现在已经运行了 4 次,退出状态仍然xfs_repair -n是 1。文件系统已安装,因此原则上我可以访问数据,但我想知道是否还有其他选项可以找出实际损坏的内容以及如何修复它。

输出xfs_repair -n

Phase 1 - find and verify superblock...
        - reporting progress in intervals of 15 minutes
Memory available for repair (2048MB) may not be sufficient.
At least 2368MB is needed to repair this filesystem efficiently
If repair fails due to lack of memory, please
turn prefetching off (-P) to reduce the memory footprint.
Phase 2 - using internal log
        - scan filesystem freespace and inode maps...
        - 22:27:46: scanning filesystem freespace - 32 of 32 allocation groups done
        - found root inode chunk
Phase 3 - for each AG...
        - scan (but don't clear) agi unlinked lists...
        - 22:27:46: scanning agi unlinked lists - 32 of 32 allocation groups done
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 30
        - agno = 15
        - agno = 16
        - agno = 31
        - agno = 1
        - agno = 17
        - agno = 18
        - agno = 19
        - agno = 2
        - agno = 20
        - agno = 21
        - agno = 3
        - agno = 22
        - agno = 4
        - agno = 23
        - agno = 24
        - agno = 5
        - agno = 25
        - agno = 6
        - agno = 26
        - agno = 27
        - agno = 7
        - agno = 28
        - agno = 8
        - agno = 29
        - agno = 9
        - agno = 10
        - agno = 11
        - agno = 12
        - agno = 13
        - agno = 14
        - 22:27:54: process known inodes and inode discovery - 4166208 of 4166208 inodes done
        - process newly discovered inodes...
        - 22:27:54: process newly discovered inodes - 32 of 32 allocation groups done
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - 22:27:55: setting up duplicate extent list - 32 of 32 allocation groups done
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 15
        - agno = 30
        - agno = 16
        - agno = 1
        - agno = 17
        - agno = 31
        - agno = 18
        - agno = 2
        - agno = 19
        - agno = 3
        - agno = 20
        - agno = 21
        - agno = 4
        - agno = 22
        - agno = 5
        - agno = 23
        - agno = 6
        - agno = 24
        - agno = 7
        - agno = 25
        - agno = 8
        - agno = 26
        - agno = 9
        - agno = 10
        - agno = 27
        - agno = 11
        - agno = 28
        - agno = 12
        - agno = 29
        - agno = 13
        - agno = 14
        - 22:28:03: check for inodes claiming duplicate blocks - 4166208 of 4166208 inodes done
No modify flag set, skipping phase 5
Phase 6 - check inode connectivity...
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify link counts...
No modify flag set, skipping filesystem flush and exiting.

这是上次运行的输出xfs_repair

Phase 1 - find and verify superblock...
        - reporting progress in intervals of 15 minutes
Memory available for repair (2048MB) may not be sufficient.
At least 2368MB is needed to repair this filesystem efficiently
If repair fails due to lack of memory, please
turn prefetching off (-P) to reduce the memory footprint.
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - 22:31:08: scanning filesystem freespace - 32 of 32 allocation groups done
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - 22:31:08: scanning agi unlinked lists - 32 of 32 allocation groups done
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 30
        - agno = 15
        - agno = 16
        - agno = 31
        - agno = 1
        - agno = 17
        - agno = 18
        - agno = 2
        - agno = 19
        - agno = 20
        - agno = 3
        - agno = 21
        - agno = 4
        - agno = 22
        - agno = 5
        - agno = 23
        - agno = 6
        - agno = 24
        - agno = 7
        - agno = 25
        - agno = 8
        - agno = 26
        - agno = 9
        - agno = 27
        - agno = 10
        - agno = 28
        - agno = 29
        - agno = 11
        - agno = 12
        - agno = 13
        - agno = 14
        - 22:31:16: process known inodes and inode discovery - 4166208 of 4166208 inodes done
        - process newly discovered inodes...
        - 22:31:16: process newly discovered inodes - 32 of 32 allocation groups done
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - 22:31:17: setting up duplicate extent list - 32 of 32 allocation groups done
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 15
        - agno = 30
        - agno = 16
        - agno = 31
        - agno = 1
        - agno = 17
        - agno = 18
        - agno = 2
        - agno = 19
        - agno = 3
        - agno = 20
        - agno = 4
        - agno = 21
        - agno = 5
        - agno = 6
        - agno = 22
        - agno = 7
        - agno = 8
        - agno = 23
        - agno = 24
        - agno = 9
        - agno = 25
        - agno = 10
        - agno = 11
        - agno = 26
        - agno = 12
        - agno = 27
        - agno = 13
        - agno = 28
        - agno = 14
        - agno = 29
        - 22:31:25: check for inodes claiming duplicate blocks - 4166208 of 4166208 inodes done
Phase 5 - rebuild AG headers and trees...
        - 22:31:28: rebuild AG headers and trees - 32 of 32 allocation groups done
        - 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...
done

答案1

事实证明这个问题就像我的另一台带有 Ext4 fs,是由于我的救援 CD 包含 xfstools 的 32 位二进制文​​件(即使内核本身是 64 位)造成的。

所以我最终安装了根分区(这没问题)并chroot到它以xfs_repair -n从那里运行。正如我所希望的,它返回了 0。

相关内容