ROOTVG

AIX => Administration => Topic started by: Jim on April 02, 2008, 04:27:50 PM



Title: Can not remove files and directories
Post by: Jim on April 02, 2008, 04:27:50 PM
Hi All-
On an Oracle 10g server, I am trying to remove the files and directories of the OEM agent.  Something keeps recreating ".nfs..." files as soon as I rm them and of course I can't remove the directories because they are not empty.  I can touch or even vi and modify the files, but I can't remove them.  I've tried rm -rf, find . -exec rm {} \; , everything I can think of while keeping the system and DB up.  Here's the environment:

root:bres35 # oslevel -s
5300-04-00
[/u01/app/oracle/OEM/agent10g/lib]
root:bres35 #

root:bres35 # mount
  node       mounted        mounted over    vfs       date        options     
-------- ---------------  ---------------  ------ ------------ ---------------
         /dev/hd4         /                jfs2   Sep 26 15:01 rw,log=/dev/hd8
         /dev/hd2         /usr             jfs2   Sep 26 15:01 rw,log=/dev/hd8
         /dev/hd9var      /var             jfs2   Sep 26 15:01 rw,log=/dev/hd8
         /dev/hd3         /tmp             jfs2   Sep 26 15:01 rw,log=/dev/hd8
         /dev/hd1         /home            jfs2   Sep 26 15:01 rw,log=/dev/hd8
         /proc            /proc            procfs Sep 26 15:01 rw             
         /dev/hd10opt     /opt             jfs2   Sep 26 15:01 rw,log=/dev/hd8
172.16.240.10 /vol/bres35bin   /u01             nfs3   Sep 26 15:01 rw,bg,hard,intr,rsize=32768,wsize=32768,vers=3,sec=sys,timeo=600
172.16.240.10 /vol/bres35log   /u03             nfs3   Sep 26 15:01 rw,bg,hard,intr,rsize=32768,wsize=32768,vers=3,sec=sys,timeo=600
172.16.240.10 /vol/bres35data  /u02             nfs3   Oct 25 13:17 rw,bg,hard,intr,rsize=32768,wsize=32768,vers=3,sec=sys,timeo=600
[/u01/app/oracle/OEM/agent10g/lib]
root:bres35 #

Here's an example:

root:bres35 # ls -l
total 2032
-rwxr-xr-x   1 oracle   oinstall    1036231 Jan 07 2005  .nfsF93D
[/u01/app/oracle/OEM/agent10g/lib]
root:bres35 # chown root .nfs*
[/u01/app/oracle/OEM/agent10g/lib]
root:bres35 # ls -l
total 2032
-rwxr-xr-x   1 root     oinstall    1036231 Jan 07 2005  .nfsF93D
[/u01/app/oracle/OEM/agent10g/lib]
root:bres35 # rm .nfs*
[/u01/app/oracle/OEM/agent10g/lib]
root:bres35 # ls -l
total 2032
-rwxr-xr-x   1 root     oinstall    1036231 Jan 07 2005  .nfs0A3D


Any suggestions?

Thanks,
Jim


Title: Re: Can not remove files and directories
Post by: Jim on April 03, 2008, 03:24:10 PM
Well I mounted the same filesystem on another client, and I was able to remove all the files...   Strange...   ::)


Title: Re: Can not remove files and directories
Post by: John R Peck on April 04, 2008, 01:44:18 PM
If it happens again,
try "fuser /filename" to see what processes are using the files.
If nothing appears,
try running filemon while you delete the files and watch for them to reappear,
then see in the report what it was that created them perhaps.


Title: Re: Can not remove files and directories
Post by: Jim on April 04, 2008, 01:53:15 PM
I used fuser on the files and directories, and it reported no processes.  I had never heard of filemon - if there's a next time, I hope to remember to try it.

Thanks!
Jim