cancel
Showing results for 
Search instead for 
Did you mean: 

rm on a directory hangs

SOLVED
Go to solution
dsi.ts.sis
Occasional Advisor

rm on a directory hangs


I cannot rm a directory under /root, session hangs and the same thing happens when i try to do ls -la /root, but if i do ls -1 /root/ it works... i know what directory under /root is causing the problem but i cannot remove it...
Any suggestions?

Thanks
8 REPLIES
dsi.ts.sis
Occasional Advisor

Re: rm on a directory hangs


Forgot to mention there's no NFS service on this server
D. Jackson_1
Honored Contributor

Re: rm on a directory hangs

It could be a file with corrupt inode information. I had the same issues recently on a Linux system. Had to do an fsck on the logical volume with it unmounted.
You will need to take the system to lvm maint mode most likely and fsck it.
Search the forums for inode corruption, it should give you some ideas.

DCJ
Ivan Ferreira
Honored Contributor

Re: rm on a directory hangs

Is this really happening only with this directory or other directories also?

Do you use LDAP or NIS to maintain user and group information?

Have you verified if there are some open files on that directory?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
dsi.ts.sis
Occasional Advisor

Re: rm on a directory hangs


Hi

It's only happening under /root/
If i do fuser -ku /root/ it just doesn't work, the processes never get killed...
This is a web server with no NIS or LDAP.

Is there anything else i could try or rebooting is the only solution?
Vitaly Karasik_1
Honored Contributor
Solution

Re: rm on a directory hangs

do you try to remove certain directory under /root, like /root/kuku?

as already said, it seems like there is a problem with "/" filesystem. reboot with "fsck" should help in this case.
dsi.ts.sis
Occasional Advisor

Re: rm on a directory hangs

Yes Vitaly, i'm trying to remove /root/prueba
but everything i try fails... i cannot do an 'ls -la' or 'rm' on that dir because the command hangs...
fuser tells me there are processes under /root/ but i cannot kill them.
Vitaly Karasik_1
Honored Contributor

Re: rm on a directory hangs

for sure you have process which uses "/root" because you're logged in as root.

but this shouldn't prevent you from delete /root/prueba

so I suggest to reboot
dsi.ts.sis
Occasional Advisor

Re: rm on a directory hangs

Reboot was the solution