使用 btrfs 检查:
$ sudo btrfs check --progress /dev/nvme0n1p7
[sudo] password for repair:
Opening filesystem to check...
checksum verify failed on 24708644864 wanted 0x00000000 found 0xb6bde3e4
checksum verify failed on 24708644864 wanted 0x00000000 found 0xb6bde3e4
checksum verify failed on 24708644864 wanted 0x00000000 found 0xb6bde3e4
bad tree block 24708644864, bytenr mismatch, want=24708644864, have=0
ERROR: cannot read chunk root
ERROR: cannot open file system
repair@pop-os:~$
使用 btrfs 救援
sudo btrfs rescue chunk-recover -y /dev/nvme0n1p7
Scanning: DONE in dev0
kernel-shared/free-space-tree.c:706: remove_free_space_extent: Assertion `key.type == BTRFS_FREE_SPACE_EXTENT_KEY` failed, value 0
btrfs(+0x185e9)[0x563ee25945e9]
btrfs(+0x1a0bf)[0x563ee25960bf]
btrfs(+0x1a0d3)[0x563ee25960d3]
btrfs(remove_from_free_space_tree+0x16e)[0x563ee25a8b74]
btrfs(btrfs_run_delayed_refs+0x456)[0x563ee25a913d]
btrfs(btrfs_commit_transaction+0x3f)[0x563ee25b0cb7]
btrfs(btrfs_recover_chunk_tree+0x1f4e)[0x563ee25eea8a]
btrfs(+0x72e83)[0x563ee25eee83]
btrfs(main+0x328)[0x563ee2593ee8]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7ff392e29d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7ff392e29e40]
btrfs(_start+0x25)[0x563ee2593f25]
Aborted
我已经安装了 btrfs-maintenance,它应该使用写时复制功能运行快照,但我无法找到它。
这里应该做什么?