루트로 디렉터리를 삭제할 수 없습니다. chattr이 도움이 되지 않습니다.

루트로 디렉터리를 삭제할 수 없습니다. chattr이 도움이 되지 않습니다.

Lost+found 디스크(/attic에 마운트됨)에서 가비지 디렉토리를 제거할 수 없습니다.

모든 명령은 루트로 수행됩니다.

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

ro 파일 시스템을 다시 마운트하지 않고는 디렉토리를 'ls'할 수 없으며(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를 보면 케이스 폴더 기능이 언급되어 있으므로 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 매뉴얼 페이지에 따르면 lsattr에서는 볼 수 있지만 chattr에서는 변경할 수 없는 E(암호화)가 있습니다. 오류가 있는 암호화된 파일이 있고 오류로 인해 수정하거나 제거할 수 없습니까?

디렉토리를 '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이므로 손상되면 놀랄 것입니다.

관련 정보