NFS wont reconnect
Mike McGinn
mikemcginn at mcginnweb.net
Thu Apr 14 10:01:43 UTC 2011
On Thursday, April 14, 2011 00:27:38 Tom H wrote:
> On Tue, Apr 12, 2011 at 8:59 PM, Nick Edwards <nick.z.edwards at gmail.com>
wrote:
> > When I start my notebook, login, wifi logs in, NFS connects, but if my
> > wifi drops out, ubuntu lucid never reconnects to NFS, I've left it for
> > hours and still wont.
> >
> > My fstab is
> > 192.168.200.100:/files1 /files1 nfs
> > rw,hard,intr,tcp,bg,rsize=32768,wsize=32768,nfsvers=3 0 0
> > 192.168.200.100:/files2 /files2 nfs
> > rw,hard,intr,tcp,bg,rsize=32768,wsize=32768,nfsvers=3 0 0
> >
> > my desktop does not have this problem, so I am sure it is not a server
> > thing, besides, if I reboot, it will reconnect, so can't be server
> > related.
> >
> > if I leave it for, well, now it's been 90 minutes since wifi reconnect, I
> > try umount -a -t nfs I get
> >
> > umount.nfs: /files2: device is busy
>
> umount -l ...
> or
> umount -fl ...
> should do it.
You do not say what network manager you are using. If you are using NM first
write a shell script to mount and unmount your shares. Then do something like
outlined below. Then learn to use google.
# /etc/NetworkManager/dispatcher.d/05-mnt-hshares
# mount the shares I use at home when we connect
#!/bin/sh
export LC_ALL=C
if [ "$1" = "eth1" ]; then
if [ "$2" = "up" ]; then
SSID=`iwconfig $IFACE | awk -F\" '{print $2}'`
# unmount work shares
/root/bin/workUnNetStuff.sh
# mount home shares
if [ "$SSID" = "fishnet" ]; then
/root/bin/homeNetStuff.sh
fi
# /usr/sbin/vpnc
fi
if [ "$2" = "down" ]; then
/root/bin/homeUnNetStuff.sh
# /usr/sbin/vpnc-disconnect
fi
fi
--
Mike McGinn FACOCM
You won't look forward to the trip!
No electrons were harmed in sending this message.
** Registered Linux User 377849
More information about the ubuntu-users
mailing list