lkml.org 
[lkml]   [1999]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: RPC: sendmsg returned error 101
On Tue, Aug 24, 1999 at 03:06:21PM +0100, Alan Cox wrote:
> > >>>>> " " == Werner Almesberger <almesber@lrc.di.epfl.ch> writes:
> > > A practical solution may be simply to forcibly unmount all
> > > stuck file systems. In any case it's better than forcing the
> > > user to press the reset button.
>
> You can only do that for NFS
>
> > Isn't this what the new umount was supposed to give us? Does anybody
> > know why it is not being used?
>
> I've been using it for a while. umount -f on NFS, followed by a 10 second
> wait if it fails then an fuser -k then a couple of umount -f's with a second
> gap.
>
> Seems to work

Thanks. I can't say I like it, but the included init script patch
seems to work for me.

Bill Rugolsky
rugolsky@ead.dsa.com
--- /etc/rc.d/init.d/netfs.0 Fri Mar 26 17:56:03 1999
+++ /etc/rc.d/init.d/netfs Tue Aug 24 12:09:11 1999
@@ -39,7 +39,25 @@
action "Mounting other filesystems" mount -a
;;
stop)
- [ -n "$NFSMTAB" ] && action "Unmounting NFS filesystems" umount -a -t nfs
+ if [ $# -eq 1 ]; then
+ sig=
+ retry=3
+ remaining=`awk '!/^#/ && $3 ~ /^nfs/ {print $2}' /proc/mounts`
+ while [ -n "$remaining" -a "$retry" -gt 0 ]
+ do
+ umount -f -a -t nfs
+ sleep 10
+ remaining=`awk '!/^#/ && $3 ~ /^nfs/ {print $2}' /proc/mounts`
+ [ -z "$remaining" ] && break
+ lsof -N
+ fuser -k -m $sig $remaining >/dev/null
+ sleep 5
+ retry=`expr $retry - 1`
+ sig=-9
+ done
+
+ fi
+ [ -n "$NFSMTAB" ] && action "Unmounting NFS filesystems" umount -f -a -t nfs
[ -n "$SMBMTAB" ] && action "Unmounting SMB filesystems" umount -a -t smbfs
[ -n "$NCPMTAB" ] && action "Unmounting NCP filesystems" umount -a -t ncpfs
rm -f /var/lock/subsys/netfs
@@ -75,7 +93,7 @@
fi
;;
restart)
- $0 stop
+ $0 stop restart
$0 start
;;
reload)
\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.048 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site