無法以 root 身分刪除目錄,chattr 沒有幫助

無法以 root 身分刪除目錄,chattr 沒有幫助

我無法刪除 Lost+Found 磁碟中的垃圾目錄(安裝在 /attic)

所有指令均以 root 身分執行:

% mount /attic/ ; cd /attic/lost+found ; pwd
/attic/lost+found
# rmdir #648843480
rmdir: failed to remove '#648843480': No such file or directory

我什至無法“ls”目錄而不導致檔案系統重新安裝ro(因為選項errors=remount-ro),並且我無法lsattr來查看屬性,甚至無法盲目地嘗試關閉所有chattr選項。

# cd ; umount /attic/ ; mount /attic/ ; cd /attic/lost+found ; pwd
/attic/lost+found
# touch test ; rm -f test
# ls
total 4
4 '#64884340'/
# touch test ; rm -f test
touch: cannot touch 'test': Read-only file system
# cd ; umount /attic/ ; mount /attic/ ; cd /attic/lost+found ; pwd
/attic/lost+found
# chattr -aAcCdDeijPsStTu #64884340
chattr: Permission denied while reading flags on #64884340
# touch test ; rm -f test
touch: cannot touch 'test': Read-only file system

(我也在中間進行 fsck 並得到相同的結果)

查看 dmesg 它提到了 casefold 功能,所以我嘗試了 chattr -F:

# cd ; umount /attic/ ; mount /attic/ ; cd /attic/lost+found ; pwd
/attic/lost+found
# chattr -F #64884340
Usage: chattr [-pRVf] [-+=aAcCdDeijPsStTu] [-v version] files...
# lsattr #64884340
# touch test ; rm -f test
touch: cannot touch 'test': Read-only file system

完成所有操作後,我需要對檔案系統進行 fsck,因為它標記有錯誤,但 fsck 沒有發現任何錯誤。請注意,lsattr 沒有輸出

注意到案例折疊錯誤以及加密上下文嗎?根據chattr手冊頁,有一個E(加密)可以被lsattr看到,但不能被chattr改變。我的加密文件是否有錯誤並且由於該錯誤我無法修復或刪除它?

嘗試 'ls' 目錄導致的 dmesg 輸出是:

[602996.921677] EXT4-fs (nvme1n1p5): mounted filesystem with ordered data mode. Opts: discard,errors=remount-ro
[603002.007850] EXT4-fs error (device nvme1n1p5): ext4_lookup:1701: inode #64884340: comm ls: casefold flag without casefold feature
[603002.008874] Aborting journal on device nvme1n1p5-8.
[603002.009475] EXT4-fs (nvme1n1p5): Remounting filesystem read-only

現在我注意到日記正在被吹走(以前不是這樣)

# mount /attic/
# dmesg -c
[601934.070181] EXT4-fs (nvme1n1p5): mounted filesystem without journal. Opts: discard,errors=remount-ro

(我正在用“tune2fs -j ...”修復它,並且偶爾也必須這樣做)

建議?這是一個相當新的 SSD,所以如果它被損壞我會感到驚訝。

相關內容