I can't remove a garbage directory in my lost+found disk (mounted on /attic)
ALL COMMANDS DONE AS ROOT:
% mount /attic/ ; cd /attic/lost+found ; pwd
/attic/lost+found
# rmdir #648843480
rmdir: failed to remove '#648843480': No such file or directory
I can't even 'ls' the directory without causing the filesystem to be remounted ro (because of the option errors=remount-ro) and I can't lsattr to see attributes or even blindly try to turn off all chattr options.
# 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
(I'm doing fsck's in between as well and get the same results)
Looking at dmesg it mentions the casefold feature, so I tried 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
Once I do all that I need to fsck the filesystem because it's marked with errors, but fsck finds nothing wrong. Note that no output happened for lsattr
Note the casefold error as well as the encryption context? According to the chattr man page, there's the E (encryption) which can be seen by lsattr but not changed by chattr. Do I have an encrypted file with an error and because of the error I can't fix or remove it?
The dmesg output caused by just trying to 'ls' the directory is:
[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
And now I'm noticing that the journal is being blown away (this wasn't true before)
# mount /attic/
# dmesg -c
[601934.070181] EXT4-fs (nvme1n1p5): mounted filesystem without journal. Opts: discard,errors=remount-ro
(Which I'm fixing with 'tune2fs -j ...' and have to do occasionally as well)
Suggestions? This is a fairly new SSD, so I'd be surprised if it's getting corrupted.
0 Answers