LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   can't delete, rename, unmount: Busy resource. AIX 5.3 (https://www.linuxquestions.org/questions/aix-43/cant-delete-rename-unmount-busy-resource-aix-5-3-a-472022/)

poeta_boy 08-08-2006 01:12 PM

can't delete, rename, unmount: Busy resource. AIX 5.3
 
Hello guys:

I am trying to erase a folder but I can't, keeps saying it's busy. I'm root and using AIX 5.3. I do a ls and I get:

Code:

ls -laq
total 24
drwxrwxr-x  5 oraepp  dba            4096 Aug 08 10:17 .
drwxr-xr-x  33 root    system        4096 Aug 08 10:23 ..
drwxr-xr-x  13 root    dba            4096 Aug 08 09:59 EPP
drwxrwxr-x  2 oraepp  dba            256 Aug 08 10:17 client
drwxrwxr-x  3 oraepp  dba            256 Feb 21 17:24 stage

and I try to erase the folder containing all those folders:

Code:

rm -r oracle
rm: 0653-611 Directory oracle/client is not empty.
rm: 0653-611 Directory oracle/stage/920_64 is not empty.
rm: 0653-611 Directory oracle/stage is not empty.
rm: 0653-611 Directory oracle/EPP/sapdata1 is not empty.
rm: 0653-611 Directory oracle/EPP/sapdata2 is not empty.
rm: 0653-611 Directory oracle/EPP/sapdata3 is not empty.
rm: 0653-611 Directory oracle/EPP/origlogA is not empty.
rm: 0653-611 Directory oracle/EPP/origlogB is not empty.
rm: 0653-611 Directory oracle/EPP/mirrlogA is not empty.
rm: 0653-611 Directory oracle/EPP/mirrlogB is not empty.
rm: 0653-611 Directory oracle/EPP/oraarch is not empty.
rm: 0653-611 Directory oracle/EPP/sapreorg is not empty.
rm: 0653-611 Directory oracle/EPP/920_64 is not empty.
rm: 0653-611 Directory oracle/EPP/sapdata4 is not empty.
rm: 0653-611 Directory oracle/EPP is not empty.
rm: 0653-611 Directory oracle is not empty.

try to rename

Code:

mv oracle oracle_old
mv: 0653-401 Cannot rename oracle to oracle_old:
            The requested resource is busy.

And finally, try to unmount:

Code:

unmount oracle
umount: 0506-349 Cannot unmount /dev/oraclelv: The requested resource is busy.

How can I get to delete that folder? any ideas?

Greetings!

Doomhammer 08-09-2006 12:31 PM

rm -rf will erase everything.

you cant erase folders using rm -r only. you need to force it using -f

poeta_boy 08-09-2006 12:35 PM

Hello:

Actually what I had todo is to kill -9 all processes related to reading that directory........ after that I finally could erase it all.

Thanks Doomhammer for your help!

KingCrimson

Frustin 08-14-2006 04:55 AM

use the fuser command on the filesystem belonging to that lv. it will tell you all the processes still using that fs.

Harry Seldon 08-16-2006 09:11 AM

fuser -c will give you the specific process ID to kill. rm -r will remove directories, too, but it won't remove files that are in use which will keep you from being able to remove the directories in question.


All times are GMT -5. The time now is 03:43 PM.