我有一个文件系统,在崩溃后,根据xfs_repair -n的说法,它已经损坏了。正如xfs_repair man页面中所述,如果检测到损坏,则存在返回状态1的xfs_repair -n。因此,我在文件系统上运行xfs_repair,然后再次运行xfs_repair -n。但退出状态仍为1。
根据CH4用于Linux管理的XFS的说法,修复所有问题可能需要三次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发布于 2015-02-02 14:39:05
事实证明,与我的另一个有Ext4 4 fs的一样,这个问题是由我的救援CD有32位xfstools二进制文件(即使内核本身是64位)造成的。
因此,我最后挂载了根分区(这是正常的),并在其中进行着色以运行xfs_repair -n。正如我所希望的,它回到了0。
https://unix.stackexchange.com/questions/182366
复制相似问题