1BTRFS-RESCUE(8)                  Btrfs Manual                  BTRFS-RESCUE(8)
2
3
4

NAME

6       btrfs-rescue - Recover a damaged btrfs filesystem
7

SYNOPSIS

9       btrfs rescue <subcommand> <args>
10

DESCRIPTION

12       btrfs rescue is used to try to recover a damaged btrfs filesystem.
13

SUBCOMMAND

15       chunk-recover [options] <device>
16           Recover the chunk tree by scanning the devices
17
18           Options
19
20           -y
21               assume an answer of yes to all questions.
22
23           -v
24               verbose mode.
25
26           -h
27               help.
28
29           Note
30           Since chunk-recover will scan the whole device, it will be VERY
31           slow especially executed on a large device.
32
33       super-recover [options] <device>
34           Recover bad superblocks from good copies.
35
36           Options
37
38           -y
39               assume an answer of yes to all questions.
40
41           -v
42               verbose mode.
43
44       zero-log <device>
45           clear the filesystem log tree
46
47       This command will clear the filesystem log tree. This may fix a
48       specific set of problem when the filesystem mount fails due to the log
49       replay. See below for sample stacktraces that may show up in system
50       log.
51
52       The common case where this happens has been fixed a long time ago, so
53       it is unlikely that you will see this particular problem, but the
54       utility is kept around.
55
56           Note
57           clearing the log may lead to loss of changes that were made since
58           the last transaction commit. This may be up to 30 seconds (default
59           commit period) or less if the commit was implied by other
60           filesystem activity.
61
62       One can determine whether zero-log is needed according to the kernel
63       backtrace:
64
65           ? replay_one_dir_item+0xb5/0xb5 [btrfs]
66           ? walk_log_tree+0x9c/0x19d [btrfs]
67           ? btrfs_read_fs_root_no_radix+0x169/0x1a1 [btrfs]
68           ? btrfs_recover_log_trees+0x195/0x29c [btrfs]
69           ? replay_one_dir_item+0xb5/0xb5 [btrfs]
70           ? btree_read_extent_buffer_pages+0x76/0xbc [btrfs]
71           ? open_ctree+0xff6/0x132c [btrfs]
72
73       If the errors are like above, then zero-log should be used to clear the
74       log and the filesystem may be mounted normally again. The keywords to
75       look for are open_ctree which says that it’s during mount and function
76       names that contain replay, recover or log_tree.
77

EXIT STATUS

79       btrfs rescue returns a zero exit status if it succeeds. Non zero is
80       returned in case of failure.
81

AVAILABILITY

83       btrfs is part of btrfs-progs. Please refer to the btrfs wiki
84       http://btrfs.wiki.kernel.org for further details.
85

SEE ALSO

87       mkfs.btrfs(8), btrfs-scrub(8), btrfs-check(8)
88
89
90
91Btrfs v4.9.1                      08/06/2017                   BTRFS-RESCUE(8)
Impressum