我從網路上嘗試了很多想法,但沒有一個可行。
這看起來正確且秩序良好
**sudo btrfs filesystem show /dev/sda2**
failed to read /dev/sr0
Label: none uuid: daeedc21-7449-4b4a-ae55-e58a5a28a504
Total devices 1 FS bytes used 4.02GB
devid 1 size 32.60GB used 22.54GB path /dev/sda2
當我進行掃描時,它會返回看起來合理的回應:
**sudo btrfsck -s /dev/sda2**
found 4321669120 bytes used err is 0
total csum bytes: 4187576
total tree bytes: 23400448
total fs tree bytes: 12083200
btree space waste bytes: 6789166
file data blocks allocated: 4786331648
referenced 4126896128
Btrfs Btrfs v0.19
但是,即使我使用降級掛載選項,我仍然在日誌中收到錯誤,並且似乎無法找到好的超級區塊。
**sudo mount -o degraded -t btrfs /dev/sda2 /home**
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
日誌中看到錯誤:
[ 647.710937] device fsid 4a4b497421dceeda-4a5285a8ae555ae devid 1 transid 20368 /dev/sda2
[ 647.712760] btrfs: allowing degraded mounts
[ 647.714378] parent transid verify failed on 7051943936 wanted 20368 found 20375
[ 647.714784] parent transid verify failed on 7051943936 wanted 20368 found 20375
[ 647.715182] parent transid verify failed on 7051943936 wanted 20368 found 20375
[ 647.760270] btrfs: open_ctree failed
[ 1081.410560] device fsid 4a4b497421dceeda-4a5285a8ae555ae devid 1 transid 20368 /dev/sda2
這台筆記型電腦沒有突然斷電的情況,只是在每日更新後正常關機並重新啟動。我正在使用金士頓 SSD 驅動器,但已經使用了幾個月,所以不認為這應該是促成因素。
任何指針都受到極大的歡迎,因為我更願意繼續使用 btrfs,而不是必須移回 ext4。
答案1
我遇到了這個完全相同的問題,並通過運行修復了它sudo btrfsctl -a
(顯然運行sudo btrfs device scan
也可以工作,儘管我還沒有嘗試過)。
不幸的是,您需要在每次啟動後運行它。我找到了一個自動解決方案這裡,儘管據我了解,這有點像駭客。
答案2
嘗試安裝它-o recovery
您也可以從這裡建立 fsck.btrfs 工具
https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories#btrfs-progs_Git_Repository
這將使您能夠./btrfsck --repair /dev/devicename
注意:您還需要apt-get install build-essential
我得到了核心“BUG”,這是你沒有得到的,但在使用 btrfs 相當長一段時間後,在出現太多問題後我終於回到了 ext4。