meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:fs:btrfs:btrfs_check [2022/12/13 07:17]
niziak
linux:fs:btrfs:btrfs_check [2023/03/13 10:44] (current)
niziak
Line 1: Line 1:
 ====== btrfs check ====== ====== btrfs check ======
 +
 +====== checksum error at logical ======
 +
 +<​code>​
 +BTRFS warning (device sdb4): checksum error at logical 271624814592 on dev /dev/sdb4, physical 270551072768,​ root 677114, inode 739, offset 14508666880,​ length 4096, links 1 (path: Windows_10/​Snapshots/​{8b68a2dd-457e-496f-96df-cf24806dfe2d}.vdi)
 +</​code>​
 +
 +Reading of mentioned file returns IO error when hit 70% of progress.
 +
 +Corruption detected by periodic scrub. File was not touched for long time, so probably bitrot occurs.
 +This is single SSD data, so there is no mirror of data. There is a backup of data.
 +
 +Possible solution:
 +  * delete file to remove invalid entry from cksum tree and restore from backup
 +  * try playing with mounting with ''​ro,​rescue=ignoredatacsums''​ and copy bad file to another place and delete from source
 +
 +
 +
 ====== ​ corrupt leaf invalid data ref offset ====== ====== ​ corrupt leaf invalid data ref offset ======
 <​code>​ <​code>​
Line 5: Line 23:
 [4038494.678133] BTRFS info (device sdb4): leaf 407659724800 gen 8637875 total ptrs 97 free space 5617 owner 2 [4038494.678133] BTRFS info (device sdb4): leaf 407659724800 gen 8637875 total ptrs 97 free space 5617 owner 2
 ... ...
 +[4038494.679249] ref#9: extent data backref root 388257660928 objectid 99389691396278 offset 25442122467423744 count 11927552 
 +[4038494.679251] ref#10: (extent 407659724800 has INVALID ref type 192) 
 +...
 [4038494.679393] BTRFS error (device sdb4): block=407659724800 write time tree block corruption detected [4038494.679393] BTRFS error (device sdb4): block=407659724800 write time tree block corruption detected
 [4038494.689126] BTRFS: error (device sdb4) in btrfs_commit_transaction:​2389:​ errno=-5 IO failure (Error while writing out transaction) [4038494.689126] BTRFS: error (device sdb4) in btrfs_commit_transaction:​2389:​ errno=-5 IO failure (Error while writing out transaction)
Line 14: Line 34:
  
 <code bash> <code bash>
 +btrfs check /dev/sdb4
 +
 +ERROR: errors found in fs roots
 +found 338856771584 bytes used, error(s) found
 +</​code>​
 +
 +<code bash>
 +btrfs rescue zero-log /dev/sdb4
 btrfs check --repair /​dev/​mapper/​pool2 btrfs check --repair /​dev/​mapper/​pool2
 </​code>​ </​code>​