1834670 Members
1911 Online
110069 Solutions
New Discussion

space deletion

 
rudy_3
Occasional Advisor

space deletion

i wanna thank the guys for helping me i solve have of it i tried to umount to day to try it i couldnt because propebly something was writing to it so i tried fuser no result so i started killing prosses and try finaly it i was able to umount the directory and mount it again it work i got the space back so is there any other automatic way for doing that whe i remove the 7 giga directory to automaticly remove the size also
good
2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: space deletion

The best thing to do is to do an 'fuser -u' on the file, see what processes have the file open and kill them. Do that BEFORE you remove the file.

YOu can't just remove a file it automatically kill all processes associated with that file. Unix don't work that way.

harry d brown jr
Honored Contributor

Re: space deletion

Rudy,

May I suggest that you get a copy of "lsof" from:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.55/

You can use it like this, when you wnat to know who is using a mount point:

lsof /tmp

which on my system (as an example) shows this:

# /usr/local/bin/lsof /tmp
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
snmpdm 1042 root 2w REG 64,0xa 0 9 /tmp (/dev/vg00/lvol10)
snmpdm 1042 root 4u unix 64,0xa 0t0 10 /tmp/.AgentSockets/A (0x43388280)
hp_unixag 1054 root 1r DIR 64,0xa 3072 2 /tmp
hp_unixag 1054 root 2r DIR 64,0xa 3072 2 /tmp
mib2agt 1063 root 1r DIR 64,0xa 3072 2 /tmp
mib2agt 1063 root 2r DIR 64,0xa 3072 2 /tmp
trapdesta 1072 root 1r DIR 64,0xa 3072 2 /tmp
trapdesta 1072 root 2r DIR 64,0xa 3072 2 /tmp
#


It's a lot better than fuser!

And another way to thank people, is make sure you assign points to those that have helped you :-))


live free or die
harry
Live Free or Die