# How to remove cycled directory



## dzodzo (Aug 9, 2010)

Greetings,

sorry for longer intro but maybe it'll help to find out the reason for the problem.

Recently my harddrive survived a crash but not entirely. I lost /usr/local/ partition and had to reinstall everything from scratch (no backups x( )
I tried to revive it with fsck but with no success so i created it again.

After several installations, my GF managed to blow the fuses so it had one hard crash again but this time i was able to salvage it with fsck. With one fault - in /usr/local/lost+found i got a directory #0000923 that is cycled. I mean it's like this:


```
11:40:51 root@kirril2: /usr/local/lost+found/#0000923/#0000923/#0000923
# ls
#0000923
```

and goes on and on until OS can't go any deeper. I tried to fsck it again but it didn't help, there was error something like:

missing '..' ... cannot fix, first entry in directory contains ... (don't remember exactly)

Now the filesystem works but whenever i try to do find i get the fts_read error, that is related to this directory.

If anyone knows what might have caused this or how to fix it, i can provide you with more information on request, thanks.


----------



## gkontos (Aug 9, 2010)

Replacing the disk drive maybe.


----------



## camelia (Aug 9, 2010)

try to play with fsdb(8)


----------



## fronclynne (Aug 10, 2010)

Is there anything else in /usr/local/lost+found/?  If not, you might be able to just `# rm -r /usr/local/lost+found`
If that fails, grab the inode with [cmd=""]ls -li[/cmd] and try clri(8) *before* you go whole hog into fsdb(8).  fsdb can do a lot of damage really quickly, so be very careful using it.


----------



## dzodzo (Aug 13, 2010)

hello, so i managed to repair it with the help of fsdb but then i had to do a little hack

with unmounted /usr/local i ran fsdb and then removed the inode with clri command but then in the /usr/local directory when i tried to ls -l i got 
	
	



```
Bad file descriptor
```
 error for lost+found directory, so i just renamed it to some different name (i still don't know how this was possible) and then ran fsck which removed any references to this inode so the directory finally disappeared from the filesystem

Thanks for your input friends.

Admin, you can mark this thread as solved, thank you.


----------

