Skip to content

Commit e80f2bf

Browse files
csnoveradam900710
authored andcommitted
btrfs-progs: docs: clarify transid verify error recoverability
- Fix the format of the transid mismatch reason and type - Fix a typo in the reason - Explain more on the recoverable case That both a regular metadata read and read-write scrub can do the same trick. - Add an extra data salvage method using "rescue=all,ro" mount option Signed-off-by: Colin Snover <[email protected]> [ Add an SoB line ] Signed-off-by: Qu Wenruo <[email protected]>
1 parent 5b0452d commit e80f2bf

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

Documentation/trouble-index.rst

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ for description and may need further explanation what needs to be done.
99
Error: parent transid verify error
1010
----------------------------------
1111

12-
Reason: result of a failed internal consistency check of the filesystem's metadata.
13-
Type: permanent
12+
| Reason: result of a failed internal consistency check of the filesystem's metadata.
13+
| Type: correctable by ``btrfs-scrub`` if a good copy exists on another replica; otherwise, permanent
14+
|
1415
1516
.. code-block:: none
1617
@@ -21,17 +22,26 @@ contains target block offset and generation that last changed this block. The
2122
block it points to then upon read verifies that the block address and the
2223
generation matches. This check is done on all tree levels.
2324

24-
The number in **faled on 30736384** is the logical block number, **wanted 10**
25+
The number in **failed on 30736384** is the logical block number, **wanted 10**
2526
is the expected generation number in the parent node, **found 8** is the one
2627
found in the target block. The number difference between the generation can
2728
give a hint when the problem could have happened, in terms of transaction
2829
commits.
2930

30-
Once the mismatched generations are stored on the device, it's permanent and
31-
cannot be easily recovered, because of information loss. The recovery tool
32-
``btrfs restore`` is able to ignore the errors and attempt to restore the data
33-
but due to the inconsistency in the metadata the data need to be verified by the
34-
user.
31+
Once the mismatched generations are stored on the device, without a good copy
32+
from another replica, it's permanent and cannot be easily recovered because of
33+
information loss. However, if a valid copy exists on another replica, btrfs will
34+
transparently choose the good copy and overwrite the bad one with the correct
35+
metadata to fix it permanently.
36+
Manually running ``btrfs scrub`` in read-write mode will also do the same trick.
37+
38+
Otherwise one can only salvage the data either through ``-o rescue=all,ro``
39+
mount option, which will try its best to read what is still intact.
40+
Or through ``btrfs restore`` which can ignore the transid mismatch error to some
41+
extent.
42+
43+
The user needs to manually to verify the contents of salvaged data.
44+
Since either way data checksum verfication is no longer in place.
3545

3646
The root cause of the error cannot be easily determined, possible reasons are:
3747

0 commit comments

Comments
 (0)