Here we should also have the following:
enable scrubbing of root
zero-log is needed, otherwise proceed with
recovering datamount -o ro,recovery to mount a filesystem with issues
btrfs restore will help you copy data off a broken
btrfs filesystem
rescue - Modes allowing mount with damaged filesystem
structures, all requires the filesystem to be mounted read-only and
doesn’t allow remount to read-write. This is supposed to provide unified
and more fine grained tuning of errors that affect filesystem operation.
usebackuproot - Try to use backup root slots inside
super block. Replaces standalone option usebackuprootnologreplay - Do not replay any dirty logs. Replaces
standalone option nologreplayignorebadroots, ibadroots - Ignore bad
tree roots, greatly improve the chance for data salvage.
DANGERignoredatacsums, idatacsums - Ignore data
checksum verification. DANGERignoremetacsums, imetacsums - Ignore
metadata checksum verification, useful for interrupted checksum
conversion.all - Enable all supported rescue options.One can determine whether zero-log is needed according to the kernel backtrace:
? 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]
? btree_read_extent_buffer_pages+0x76/0xbc [btrfs]
? open_ctree+0xff6/0x132c [btrfs]
btrfs rescue zero-log <device> - clear the
filesystem log tree, This command will clear the filesystem log tree.
This may fix a specific set of problem when the filesystem mount fails
due to the log replay. See below for sample stack traces that may show
up in system log.btrfs rescue super-recovery <device> - Recover
bad superblocks from good copies.btrfsck
-b|--backup
-p|--progress
--readonly
-s|--super <N>
--repair
Last modified: Sun Jun 29 20:59:42 2025