「快取與超代不匹配,空間快取將失效」這是什麼意思以及如何修復?

「快取與超代不匹配,空間快取將失效」這是什麼意思以及如何修復?

我在嘗試在系統中擴展 btrfs 分區時遇到了一些問題,即:

sudo btrfsck /dev/sdb9 
[sudo] password for braiam: 
Checking filesystem on /dev/sdb9
UUID: f7e9ac38-5068-4c55-97ab-41430b360d4f
checking extents
checking free space cache
cache and super generation don't match, space cache will be invalidated
checking fs roots
checking csums
There are no extents for csum range 0-69632
Csum exists for 0-69632 but there is no extent record
found 10204750230 bytes used err is 1
total csum bytes: 10835824
total tree bytes: 80138240
total fs tree bytes: 59863040
total extent tree bytes: 4743168
btree space waste bytes: 21830024
file data blocks allocated: 11097911296
 referenced 11097911296
Btrfs v3.16

我正在努力解決這個問題。遺憾的是,添加該檢查的補丁(順便說一句,如果失敗,將返回退出代碼 1)並沒有解釋它是什麼,也沒有解釋我們如何修復它。現在,分區可以發揮七大奇蹟,但我無法調整它的大小。有沒有辦法可以解決此問題並防止將來再次發生?

答案1

網路上有個帖子BTRFS 列表這建議使用該--clear-space-cache選項。以下命令為我解決了同樣的問題:

btrfs check --clear-space-cache v1 /dev/sda5

相關內容