From btrfs Wiki
Revision as of 16:13, 10 June 2015 by HugoMills (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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.


If you can mount the filesystem

Then you do not need to use btrfs-zero-log.

If you try to mount the filesystem, and it fails

Look in your kernel logs (dmesg), and continue reading.

If your kernel log has an oops in it

with something like this in it:

? replay_one_dir_item+0xb5/0xb5 [btrfs]
? walk_log_tree+0x9c/0x19d [btrfs]
? btrfs_read_fs_root_no_radix+0x169/0x1a1 [btrfs]
? btrfs_recover_log_trees+0x195/0x29c [btrfs]
? replay_one_dir_item+0xb5/0xb5 [btrfs]

then you need to upgrade your kernel, as only older kernels are known to print oopses on log errors. If it's a recent kernel, please report the problem to the mailing list or

Note the replay_one_dir_item, and references to the log (e.g. walk_log_tree). If you don't see those, or similar messages, this entry is not for you, and you need to report the problem to the mailing list or bugzilla, or ask for help on the #btrfs IRC channel.

If your kernel log has any other messages in it

The output:

BTRFS: failed to read log tree

would indicate that you may have a problem that can be fixed by btrfs-zero-log. If that message is not there, then btrfs-zero-log is unlikely to help you, and you need to seek help elsewhere: the mailing list, htpp://, or the #btrfs IRC channel.

Running btrfs-zero-log on a filesystem with any other kind of mount problem will most likely not fix it, and may make recovering it harder. If in doubt, check with the developers on IRC or the mailing list first.

Personal tools