LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Can't delete from lost+found (https://www.linuxquestions.org/questions/linux-hardware-18/cant-delete-from-lost-found-400192/)

Wocky 01-06-2006 07:06 AM

Can't delete from lost+found
 
I had a disk failure last month; when I ran fsck on the crook disk (a 400GB Seagate ST3400832A with a single ext3 filesystem on it). I got lots of orphaned files and directories (about two thousand in total), which were put in lost+found. It appears that some of these have become dir entries from blocks that were originally part of some file. I say this because the owner/group ID's are ludicrously large numbers, some of the files are block/character devices or named pipes (which weren't on the original fs), permissions seem to be randomly allocated, etc. I've gone through all these files and dirs, put what I could identify back where it came from, and deleted what I decided what I could live without.

After all this I've got two files and two directories in lost+found that I can't rename, can't delete, can't change in any way (though I'm logged in as root). Here's the output of ls -l:
drwSr--rwt 2 971522593 1133183697 8192 Jan 1 1970 #262227/
--w--w--w- 1 789986819 1120023271 40960 Jan 1 1970 #29491281
-r-xrwx-w- 1 3887349799 1119440176 40960 Jan 1 1970 #29491285*
drw-rwsrwx 2 971456628 1133216480 8192 Jan 1 1970 #42057802/


I'm running kernel version 2.4.20; it was originally a redhat 7.2 system, but I've changed almost everything. It's on a dual-processor 500MHz celeron box.

Anyone got any ideas how I can get rid of these objects?

Thanks
Wocky

Notwerk 01-06-2006 07:43 AM

Sorry if this sounds patronising but did you try:
Code:

#chown root /lost+found/*
#chmod 0700 /lost+found/*
#rm -rf /lost+found/*


Wocky 01-06-2006 08:07 AM

Thanks Notwerk; I did try that, without success.

I've found the problem, now, though. lsattr revealed that all the objects had random attributes set, including i;
chattr =c /lost+found/#*
chattr -c /loct+found/#*
cleared these; chown root then worked, and I could delete them. Thanks anyway; I should have done that first!

Wocky


All times are GMT -5. The time now is 10:19 AM.