내가 찾은 문서에 따르면https://btrfs.wiki.kernel.org/index.php/Data_Structures다음 dmesg를 이해하는 데 문제가 있습니다.
[ 173.946830] device fsid 02cc6d9f-28c6-45f4-b69e-f3ec8d6c24a5 devid 1 transid 21 /dev/loop0
[ 173.947044] device fsid 02cc6d9f-28c6-45f4-b69e-f3ec8d6c24a5 devid 1 transid 21 /dev/loop0
[ 173.947541] btrfs: disk space caching is enabled
[ 174.000257] btrfs: mismatching generation and generation_v2 found in root item. This root was probably mounted with an older kernel. Resetting all new fields.
[ 174.012216] parent transid verify failed on 30113792 wanted 13 found 35
[ 174.018261] parent transid verify failed on 30113792 wanted 13 found 35
[ 174.057499] btrfs: open_ctree failed
어떤 나무에 무슨 문제가 있나요? 보다 구체적으로 btrfs 상위 transid는 무엇입니까?
root@v7:/srv# btrfs-debug-tree -b 30113792 disk
parent transid verify failed on 30113792 wanted 13 found 35
parent transid verify failed on 30113792 wanted 13 found 35
parent transid verify failed on 30113792 wanted 13 found 35
parent transid verify failed on 30113792 wanted 13 found 35
Ignoring transid failure
leaf 30113792 items 18 free space 447 generation 35 owner 5
fs uuid 02cc6d9f-28c6-45f4-b69e-f3ec8d6c24a5
chunk uuid 73044589-a58e-4314-891f-1d9ce4b53540
item 0 key (51372 INODE_ITEM 0) itemoff 3835 itemsize 160
inode generation 28 transid 31 size 655 block group 0 mode 100640 links 1
item 1 key (51372 INODE_REF 477) itemoff 3818 itemsize 17
inode ref index 356 namelen 7 name: nshadow
item 2 key (51372 EXTENT_DATA 0) itemoff 3142 itemsize 676
inline extent data size 655 ram 655 compress 0
item 3 key (51401 INODE_ITEM 0) itemoff 2982 itemsize 160
inode generation 32 transid 33 size 59 block group 0 mode 100640 links 1
item 4 key (51401 INODE_REF 51225) itemoff 2962 itemsize 20
inode ref index 34 namelen 10 name: dmesg.1.gz
item 5 key (51401 EXTENT_DATA 0) itemoff 2882 itemsize 80
inline extent data size 59 ram 59 compress 0
item 6 key (51402 INODE_ITEM 0) itemoff 2722 itemsize 160
inode generation 32 transid 32 size 25630 block group 0 mode 100640 links 1
item 7 key (51402 INODE_REF 51225) itemoff 2707 itemsize 15
inode ref index 37 namelen 5 name: dmesg
item 8 key (51402 EXTENT_DATA 0) itemoff 2654 itemsize 53
extent data disk byte 699076608 nr 28672
extent data offset 0 nr 28672 ram 28672
extent compression 0
item 9 key (51428 INODE_ITEM 0) itemoff 2494 itemsize 160
inode generation 34 transid 34 size 598 block group 0 mode 100644 links 1
item 10 key (51428 INODE_REF 477) itemoff 2480 itemsize 14
inode ref index 460 namelen 4 name: mtab
item 11 key (51428 EXTENT_DATA 0) itemoff 1861 itemsize 619
inline extent data size 598 ram 598 compress 0
item 12 key (51429 INODE_ITEM 0) itemoff 1701 itemsize 160
inode generation 34 transid 35 size 538 block group 0 mode 100644 links 1
item 13 key (51429 INODE_REF 51225) itemoff 1683 itemsize 18
inode ref index 38 namelen 8 name: boot.log
item 14 key (51429 EXTENT_DATA 0) itemoff 1124 itemsize 559
inline extent data size 538 ram 538 compress 0
item 15 key (51430 INODE_ITEM 0) itemoff 964 itemsize 160
inode generation 34 transid 35 size 134888 block group 0 mode 100644 links 1
item 16 key (51430 INODE_REF 51225) itemoff 950 itemsize 14
inode ref index 39 namelen 4 name: udev
item 17 key (51430 EXTENT_DATA 0) itemoff 897 itemsize 53
extent data disk byte 698941440 nr 135168
extent data offset 0 nr 135168 ram 135168
extent compression 0
root@v7:/srv#
또한 새 transid 36을 생성하고 fs를 마운트하려고 하면 btrfs를 복원할 수 없는 이유를 이해하는 데 어려움을 겪고 있습니다.
답변1
btrfsck disk
나는 내 btrfs fs 트리가 엉망이 되어 나중에 정리할 수 있다는 결론에 도달했습니다 .
이제 당신은 붙어 있습니다 :
root@v7:/srv# btrfs-find-root disk
Super think's the tree root is at 29360128, chunk root 20971520
Found tree root at 29360128
root@v7:/srv# btrfs-restore -t 29360120 disk /mnt/