修复 btrfs "btrfs parent transid verify failed on ..."
fix btrfs "btrfs parent transid verify failed on ..."
btrfs fi show
显示所有 btrfs 文件系统,但也显示很多错误,例如:
parent transid verify failed on 109973766144 wanted 1823 found 1821
文件系统仍然可以卸载和重新挂载。
网上冲浪我发现了很多answers recommending to clear btrfs
' internal log by using btrfs-zero-log
. I thought btrfsck
could help but eventually I discovered the official recommendation which is to first just start a btrfs scrub
,然后才采取其他行动!
所以 运行 btrfs scrub /path/to/mountpoint
如果您仍然可以挂载您的文件系统。也许它像我的情况一样工作。
我遇到过类似情况:
- 日志 已满
parent transid verify failed on 109973766144 wanted 1823 found 1821
- dmesg 满了
BTRFS info (device sda): no csum found for inode 16485445 start 73728
和 BTRFS warning (device sda): csum failed ino 16485465 off 36864 csum 2268363541 expected csum 0
我的系统配置
- 具有 3 个 nfs 共享的 NAS
- BTRFS 文件系统
Rockstor 操作系统
RAID 10 设置
补充信息
btrfs 挂载变为只读
btrfs-scrub 失败 ERROR: scrubbing /dev/md124p2 failed for device id 1: ret=-1, errno=5
我通过删除 nfs export ie 解决了这个问题。从 /etc/export/ 然后重新安装卷,瞧,一切都正常了
2018 年 1 月 29 日更新: 工作几天后,它又回到了完全相同的状态
Similar/Same 问题在这里:
parent transid verify failed on 29605888 wanted 50 found 46
对我来说,btrfs 不再是可挂载的,所以 btrfs scrub
是别无选择。
我的 /etc/exports
也是空的。
我尝试了 btrfsck --init-extent-tree /dev/sda4
但我仍然遇到错误。
...
btrfs check(main+0x82)[0x411ba2]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f8210fab555]
btrfs check[0x411ca8]
Aborted
#
Link 截图(无法上传):
Screenshot
看来唯一的解决办法就是通过
将数据恢复到另一个磁盘
btrfs restore /dev/sda4 /mnt/anotherdisk/folder
.
当心 btrfs-zero-log
btrfs-zero-log documentation 明确指出它不是通用工具:
btrfs-zero-log is not a general fix-everything tool, despite what many people believe and state around the internet. You generally don't need to use it.
此工具只有一个用例:当您有 BTRFS: failed to read log tree
个日志时。
修复 父传输验证失败 错误 usebackuproot
3.2Linux内核introduced in January 2012recovery
选项。
然后,在 2016 年 5 月的 4.6 版本中,it was superseded by usebackuproot
。
有兴趣的也可以看看the commit
documentation解释清楚它的作用:
usebackuproot
nousebackuproot
(since: 4.6, default: off)
Enable autorecovery attempts if a bad tree root is found at mount time.
Currently this scans a backup list of several previous tree roots and
tries to use the first readable. This can be used with read-only mounts as well.
Note: This option has replaced recovery.
A note in the official FAQ section 声明这是修复此“父传输”错误的正确方法:
How do I recover from a "parent transid verify failed" error?
For example:
parent transid verify failed on 29360128 wanted 1486656 found 1486662
If the second two numbers (wanted 1486656 and found 1486662) are close
together (within about 20 of each other), then mounting with
-o ro,usebackuproot
may help. If it's successful with a read-only mount, then try again
without the ro
option, for a read-write mount.
If the usebackuproot doesn't work, then the FS is basically unrecoverable in its current state with current tools. You should use btrfs restore to refresh your backups, and then restore from them.
要使用的命令
These commands are just example of a failed btrfs disk on a Fedora installation.
Replace /dev/sda2
with your device and /sysroot
with your mount point
首先在只读模式下尝试:
mount -t btrfs -o ro,usebackuproot /dev/sda2 /sysroot
如果可行,请在不使用只读命令的情况下重试:
mount -t btrfs -o usebackuproot /dev/sda2 /sysroot
如果可行,您应该可以启动 Linux。
首先运行这个命令:
sudo btrfs rescue super-recover -v /dev/sda2
如果它告诉你“所有超级都有效,无需恢复”,你需要运行以下命令来清除文件系统日志树:
sudo btrfs rescue zero-log /dev/sda2
现在您应该可以挂载 Btrfs
文件系统了。
btrfs fi show
显示所有 btrfs 文件系统,但也显示很多错误,例如:
parent transid verify failed on 109973766144 wanted 1823 found 1821
文件系统仍然可以卸载和重新挂载。
网上冲浪我发现了很多answers recommending to clear btrfs
' internal log by using btrfs-zero-log
. I thought btrfsck
could help but eventually I discovered the official recommendation which is to first just start a btrfs scrub
,然后才采取其他行动!
所以 运行 btrfs scrub /path/to/mountpoint
如果您仍然可以挂载您的文件系统。也许它像我的情况一样工作。
我遇到过类似情况:
- 日志 已满
parent transid verify failed on 109973766144 wanted 1823 found 1821
- dmesg 满了
BTRFS info (device sda): no csum found for inode 16485445 start 73728
和BTRFS warning (device sda): csum failed ino 16485465 off 36864 csum 2268363541 expected csum 0
我的系统配置
- 具有 3 个 nfs 共享的 NAS
- BTRFS 文件系统
Rockstor 操作系统
RAID 10 设置
补充信息
btrfs 挂载变为只读
btrfs-scrub 失败
ERROR: scrubbing /dev/md124p2 failed for device id 1: ret=-1, errno=5
我通过删除 nfs export ie 解决了这个问题。从 /etc/export/ 然后重新安装卷,瞧,一切都正常了
2018 年 1 月 29 日更新: 工作几天后,它又回到了完全相同的状态
Similar/Same 问题在这里:
parent transid verify failed on 29605888 wanted 50 found 46
对我来说,btrfs 不再是可挂载的,所以 btrfs scrub
是别无选择。
我的 /etc/exports
也是空的。
我尝试了 btrfsck --init-extent-tree /dev/sda4
但我仍然遇到错误。
...
btrfs check(main+0x82)[0x411ba2]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f8210fab555]
btrfs check[0x411ca8]
Aborted
#
Link 截图(无法上传): Screenshot
看来唯一的解决办法就是通过
将数据恢复到另一个磁盘btrfs restore /dev/sda4 /mnt/anotherdisk/folder
.
当心 btrfs-zero-log
btrfs-zero-log documentation 明确指出它不是通用工具:
btrfs-zero-log is not a general fix-everything tool, despite what many people believe and state around the internet. You generally don't need to use it.
此工具只有一个用例:当您有 BTRFS: failed to read log tree
个日志时。
修复 父传输验证失败 错误 usebackuproot
3.2Linux内核introduced in January 2012recovery
选项。
然后,在 2016 年 5 月的 4.6 版本中,it was superseded by usebackuproot
。
有兴趣的也可以看看the commit
documentation解释清楚它的作用:
usebackuproot
nousebackuproot
(since: 4.6, default: off)
Enable autorecovery attempts if a bad tree root is found at mount time.
Currently this scans a backup list of several previous tree roots and
tries to use the first readable. This can be used with read-only mounts as well.
Note: This option has replaced recovery.
A note in the official FAQ section 声明这是修复此“父传输”错误的正确方法:
How do I recover from a "parent transid verify failed" error?
For example:
parent transid verify failed on 29360128 wanted 1486656 found 1486662
If the second two numbers (wanted 1486656 and found 1486662) are close together (within about 20 of each other), then mounting with
-o ro,usebackuproot
may help. If it's successful with a read-only mount, then try again without the
ro
option, for a read-write mount.If the usebackuproot doesn't work, then the FS is basically unrecoverable in its current state with current tools. You should use btrfs restore to refresh your backups, and then restore from them.
要使用的命令
These commands are just example of a failed btrfs disk on a Fedora installation. Replace
/dev/sda2
with your device and/sysroot
with your mount point
首先在只读模式下尝试:
mount -t btrfs -o ro,usebackuproot /dev/sda2 /sysroot
如果可行,请在不使用只读命令的情况下重试:
mount -t btrfs -o usebackuproot /dev/sda2 /sysroot
如果可行,您应该可以启动 Linux。
首先运行这个命令:
sudo btrfs rescue super-recover -v /dev/sda2
如果它告诉你“所有超级都有效,无需恢复”,你需要运行以下命令来清除文件系统日志树:
sudo btrfs rescue zero-log /dev/sda2
现在您应该可以挂载 Btrfs
文件系统了。