如何修复btrfs root inode错误

时间:2015-06-17 06:42:19

标签: btrfs

正式运行btrfsckbtrfs check --repair会给出此输出,指出存在root inode错误。修复命令不能解决问题,重新运行将显示相同的输出。系统完全可安装且可操作,但我无法对分区执行高级操作(调整大小)。

sudo btrfs check --repair /dev/sda9
enabling repair mode
Checking filesystem on /dev/sda9
UUID: 82fca3c2-703b-4fae-aec2-6b7df1be71c1
checking extents
Fixed 0 roots.
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
root 257 inode 452001 errors 400, nbytes wrong
root 257 inode 452004 errors 400, nbytes wrong
root 257 inode 452005 errors 400, nbytes wrong
root 257 inode 452006 errors 400, nbytes wrong
root 257 inode 452010 errors 400, nbytes wrong
root 257 inode 452011 errors 400, nbytes wrong
root 257 inode 452012 errors 400, nbytes wrong
root 257 inode 1666032 errors 400, nbytes wrong
checking csums
checking root refs
found 33957216263 bytes used err is 0
total csum bytes: 32206988
total tree bytes: 968933376
total fs tree bytes: 886636544
total extent tree bytes: 35323904
btree space waste bytes: 199109273
file data blocks allocated: 41090113536
 referenced 32584159232
btrfs-progs v4.0.1

1 个答案:

答案 0 :(得分:6)

如果破坏的inode是唯一问题,解决方案是简单地删除它们。可能有更快的方法来做到这一点,但这对我有用。从here我收集到你可以使用find命令来搜索这样的inode:

find / -inum XXXXXX -print

当然从btrfsck命令给它有问题的inode。它会显示有问题的文件,您可以删除它。当一切都被删除后,btrfsck将被清除,系统将正常运行。

P.S。我问了并回答了这个问题,因为在这里找不到任何有用的信息。希望它会有所帮助。