Debian

loop0 上的 EXT4-fs 錯誤

  • February 2, 2020

我安裝了最新的 Proxmox 的 Debian 10。

2 固態硬碟:

sda1: EFI
sda2: raid1 (/dev/md0)
sda3: swap
sdb1: EFI (clone of sda1)
sdb2: raid1 (/dev/md0)
sdb3: swap

更新後,我想用 dd 將 /dev/sda1 複製到 /dev/sdb1,但我犯了一個錯誤並輸入了dd if=/dev/sda of=/dev/sdb. 我用 Ctrl+C 取消了它,執行了正確的命令dd if=/dev/sda1 of=/dev/sdb1並重新啟動。

該系統似乎工作,但我的日誌中有這些錯誤:

Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769
Feb 02 20:50:01 Yggdrasil kernel: EXT4-fs error (device loop0): ext4_lookup:1704: inode #174282: comm php: deleted inode referenced: 174769

fsck在救援模式下執行,但似乎沒有發現這些錯誤,因為它們繼續在日誌中彈出。

誰能幫我?

解釋錯誤: 該錯誤並不表示物理磁碟有問題;loop0是一個環回設備。它是一種塊儲存設備,它使用磁碟上的文件作為備份儲存。您可能會說磁碟中的磁碟。這些環回磁碟有自己的文件系統,有時還有自己的分區表。所以在保存它們的物理磁碟上執行 fsck 不會有任何影響

解決方案

找到支持循環設備的文件並在其losetup -a | grep loop0上執行 fsck

已解決:我找到了罪魁禍首。這是我的 lxc 圖像之一。

我跑了e2fsck /var/lib/vz/images/100/vm-100-disk-0.raw,現在錯誤消失了。

引用自:https://unix.stackexchange.com/questions/565446