gpt4 book ai didi

linux - 修复 btrfs "btrfs parent transid verify failed on ..."

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:55:34 24 4
gpt4 key购买 nike

btrfs fi show 显示所有 btrfs 文件系统,但也显示很多错误,例如:

parent transid verify failed on 109973766144 wanted 1823 found 1821

文件系统仍然可以卸载和重新挂载。

最佳答案

当心 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修复parent transid verify failed错误

3.2 Linux 内核 introduced in January 2012 恢复 选项。然后,在 2016 年 5 月的 4.6 版本中,it was superseded通过 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声明这是修复此“parent transid”错误的正确方法:

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 closetogether (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 againwithout 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

如果可行,请在不使用 readonly 命令的情况下重试:

mount -t btrfs -o usebackuproot /dev/sda2 /sysroot

如果这有效,您应该能够启动 Linux。

关于linux - 修复 btrfs "btrfs parent transid verify failed on ...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46472439/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com