Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cant unmount or kill a nfs share
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 11, 2005 9:48 am    Post subject: cant unmount or kill a nfs share Reply with quote

its mounted , but i cant unmount it or kill the processes.

Code:
nervada / # mount |grep grenada
grenada:/ on /mnt/router type nfs (ro,addr=192.168.0.1,addr=192.168.0.1)
nervada / # umount /mnt/router
umount: /mnt/router: device is busy
umount: /mnt/router: device is busy

so I try
Code:
nervada / # fuser -ki /mnt/router
/mnt/router:         28576c 28594c 28617c
Kill process 28576 ? (y/N) y
Kill process 28594 ? (y/N) y
Kill process 28617 ? (y/N) y
No automatic removal. Please use  umount /mnt/router
nervada / # umount /mnt/router
umount: /mnt/router: device is busy
umount: /mnt/router: device is busy

and then
Code:
nervada / # lsof |grep router
ls        28576   root  cwd       DIR       0,17     4096
ls        28576   root    3r      DIR       0,17     4096
ls        28594   root  cwd       DIR       0,17     4096
ls        28594   root    3r      DIR       0,17     4096
ls        28617   root  cwd       DIR       0,17     4096
ls        28617   root    3r      DIR       0,17     4096
nervada / # kill 28576
nervada / # lsof |grep router
ls        28576   root  cwd       DIR       0,17     4096
ls        28576   root    3r      DIR       0,17     4096
ls        28594   root  cwd       DIR       0,17     4096
ls        28594   root    3r      DIR       0,17     4096
ls        28617   root  cwd       DIR       0,17     4096
ls        28617   root    3r      DIR       0,17     4096
nervada / #                                                   


and not a stale file handle in sight !

Where to from here ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Oct 11, 2005 11:16 am    Post subject: Reply with quote

Try a
Code:

kill -9 <pid>

instead of
Code:

kill <pid>

The -9 sends the KILL signal instead of a TERM signal (view kill manpage).
This should kill really kill the process...
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 11, 2005 11:38 am    Post subject: Reply with quote

Code:
nervada ~ # lsof |grep router
ls        28576   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28576   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
nervada ~ # kill -9 28576
nervada ~ # lsof |grep router
ls        28576   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28576   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
nervada ~ # kill -9 28594
nervada ~ # lsof |grep router
ls        28576   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28576   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
nervada ~ # kill -9 28617
nervada ~ # lsof |grep router
ls        28576   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28576   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28594   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root  cwd       DIR       0,17     4096          2 /mnt/router (grenada:/)
ls        28617   root    3r      DIR       0,17     4096          2 /mnt/router (grenada:/)
nervada ~ #                               


asn they are still all there!
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Oct 11, 2005 11:51 am    Post subject: Reply with quote

Can you please get the state and the process name for the pids!? Maybe this
things waiting for a child to finish or something like this. :?: :roll: :?:
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 11, 2005 12:06 pm    Post subject: Reply with quote

Quote:
Can you please get the state and the process name for the pids

how ?
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Oct 11, 2005 12:54 pm    Post subject: Reply with quote

Get the complete process list with hierarchical ordering via
Code:

 ps aux -H

and search for your processes. Maybe they have childs or
parents you have to kill!? It really just a thought...
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 11, 2005 1:03 pm    Post subject: Reply with quote

Code:
nervada ~ # ps aux -H |grep router
root     31182  0.0  0.2   1652   484 pts/5    S+   13:03   0:00         grep router
root     15278  0.0  0.2   1620   468 ?        D    Oct01   0:01             cp -axu /mnt/router/bin /mnt/router/boot /mnt/router/dev /mnt/ro        uter/etc /mnt/router/fileshare /mnt/router/home /mnt/router/lib /mnt/router/lost+found /mnt/router/mnt /mnt/router/opt /mnt/router/proc /mnt/        router/root /mnt/router/sbin /mnt/router/sys /mnt/router/tmp /mnt/router/usr /mnt/router/var /mnt/media/backup/router/
nervada ~ #                             


weve got a cron job running as a backup and it doesnt seem to be working which is what Im trying to sort out.
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Oct 11, 2005 1:08 pm    Post subject: Reply with quote

The D in front of the copy command means <defunct>.
Quoting the ps manpage:
Code:

Processes marked <defunct> are dead processes (so-called "zombies")
that remain because their parent has not destroyed them properly. These
processes will be destroyed by init(8) if the parent process exits.

So omit the pipe to grep, search the process and kill the parents!
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Oct 11, 2005 1:44 pm    Post subject: Reply with quote

thanks - Im almost at just rebooting the thing. heres a bit of ps aux -H
Code:
root      2631  0.0  0.3   2600   860 pts/5    R+   13:39   0:00         ps aux -H
root      4685 99.7 27.7 306160 62208 ?        SNl  Sep24 24181:01   java -Xmx128m -Djava.library.path=. -Dsun.net.inetaddr.ttl=0 -Dnetworkaddress.ca
root      4779  0.0  0.2   1636   632 tty2     Ss+  Sep24   0:00   /sbin/agetty 38400 tty2 linux
root      4780  0.0  0.2   1636   632 tty3     Ss+  Sep24   0:00   /sbin/agetty 38400 tty3 linux
root      4781  0.0  0.2   1636   632 tty4     Ss+  Sep24   0:00   /sbin/agetty 38400 tty4 linux
root      4782  0.0  0.2   1636   632 tty5     Ss+  Sep24   0:00   /sbin/agetty 38400 tty5 linux
root      4783  0.0  0.2   1636   632 tty6     Ss+  Sep24   0:00   /sbin/agetty 38400 tty6 linux
root      4916  0.0  0.6   2880  1412 ?        Ss   Sep24   0:00   SCREEN
root      4917  0.0  0.6   2600  1464 pts/1    Ss+  Sep24   0:00     -/bin/bash
root      5191  0.0  0.2   1636   632 tty1     Ss+  Sep24   0:00   /sbin/agetty 38400 tty1 linux
root     15278  0.0  0.2   1620   468 ?        D    Oct01   0:01   cp -axu /mnt/router/bin /mnt/router/boot /mnt/router/dev /mnt/router/etc /mnt/rout
root     28576  0.0  0.2   1756   484 ?        D    Oct10   0:00   ls
root     28594  0.0  0.2   1756   484 ?        D    Oct10   0:00   ls
root     28617  0.0  0.2   1756   484 ?        D    Oct10   0:00   ls
rpc      30471  0.0  0.2   1840   656 ?        Ss   09:28   0:00   /sbin/portmap


is , i think the relevant output .
the cp -axu line doesnt seem to have any parents ( am i interpreting this correctly?) and neither do the ls lines with D

but kill -9 15278/28576 etc doesnt remove it

root 36 19 298m 60m 7188 S 99.7 27.8 24183:54 java
and WTF is the java process that going on?

reboot coming.........
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
pelacables
Tux's lil' helper
Tux's lil' helper


Joined: 13 Apr 2004
Posts: 120

PostPosted: Tue Oct 11, 2005 2:02 pm    Post subject: Reply with quote

For what I know, the only way to kill defunct process is rebooting.

regards,
Back to top
View user's profile Send private message
Sleipnir
Guru
Guru


Joined: 20 Sep 2005
Posts: 372
Location: Germany

PostPosted: Tue Oct 11, 2005 3:11 pm    Post subject: Reply with quote

That is partly correct. :) AFAIK init gets the parent if the real parent died without
killing its childs after backgrounding. And if init is the parent then only a reboot
helps, I think.

@thecooptoo
You interpreted the output correct. If no parent is there, the init process is the
parent... maybe an init 3 also helps!?
_________________
A)bort, R)etry, I)nfluence with large hammer.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum