-   Linux - Networking (
-   -   NFS/SMB: lose conneciton, hangs file manager (

DaveQB 07-29-2007 12:19 AM

NFS/SMB: lose conneciton, hangs file manager
Is it just me, or if you have a mounted network share on your PC and the connection to the server goes down, the file manager (Konqueror or Nautalis) or even bash, hangs when trying to get a listings of the directory that has the mount (now stale) in it ??

Is there anyway to prevent this ? A real show stopper to wait 5 mins or more, or restart your system to get resonsivness back.

drdosman 07-29-2007 12:33 AM

How are you mounting your server folders (fstab/manual/NFS/SMB)??? What mount options are you using? You may need to look at the intr for the client mount option.

DaveQB 07-29-2007 05:05 AM

I'll post below my fstab
I havent played with 'intr' options, did add 'timeo' option recently in a hope that would do it, but nothing good has come of it. [Konqueror has been hung for 5 hours now since I dropped the server to init 1 and back up again]

I run Gnome at work and mount smb shares and Nautalis hangs just the same when the connection to the samba is dropped some how.

There must be a better way.


PS dual booting Kubuntu and Mepis, this is Mepis' fstab, hence the lvm slash partitioned mount not on /


david@david ~ $ cat /etc/fstab
# Pluggable devices are handled by uDev, they are not in fstab
/dev/sdb1 / ext3 defaults,noatime 1 1
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
# Dynamic entries below
/dev/hda1 /mnt/hda1 vfat,ext3,ext2,reiserfs noauto,users,exec 0 0
/dev/hda2 /mnt/hda2 auto noauto,users,exec 0 0
/dev/sda1 /mnt/sda1 auto noauto,users,exec 0 0
/dev/sdb2 /mnt/sdb2 ext3 noauto,users,exec 0 0
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/hdb /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/main/home /home ext3 auto,users,exec,rw 0 0

# /etc/fstab: static file system information.
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc /proc proc defaults 0 0

/dev/mapper/main-slash /mnt/slash ext3 nouser,defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1

/dev/mapper/main-swap none swap sw 0 0
/dev/mapper/main-home /home ext3 nouser,defaults,atime,auto,rw,dev,exec,suid 0 2
/dev/mapper/main-programs /Programs ext3 user,defaults,atime,auto,rw,dev,exec,suid 0 2

# Capture is /dev/sdb1
LABEL=capture /capture ext3 nouser,defaults,atime,auto,rw,dev,exec,suid 0 2
# 320seagate is /dev/sda1
/dev/mapper/320seagate-320gig /storage ext3 users,defaults,atime,auto,rw,dev,exec,suid 0 2

# NFS mounts
# /home/david/server_home nfs users,rsize=8192,wsize=8192,soft,nolock,atime,auto,rw,dev,exec,suid 0 0
server:/var/www /home/david/server_site nfs users,rsize=8192,wsize=8192,soft,intr,timeo=300,nolock,atime,noauto,rw,dev,exec,suid 0 0
#debian:/var/www/apache2-default/ /home/david/server_site nfs users,rsize=8192,wsize=8192,soft,nolock,atime,auto,rw,dev,exec,suid 0 0
server:/mnt/store /home/david/server_store nfs users,rsize=8192,wsize=8192,soft,intr,timeo=300,nolock,atime,noauto,rw,dev,exec,suid 0 0
server:/home/david /home/david/server_home nfs users,rsize=8192,wsize=8192,soft,intr,timeo=300,nolock,atime,noauto,rw,dev,exec,suid 0 0
myth:/myth /mnt/myth nfs users,rsize=8192,wsize=8192,soft,intr,timeo=300,nolock,noatime,noauto,rw,nodev,exec,nosuid 0 0
myth:/myth/video /mnt/myth/video nfs users,rsize=8192,wsize=8192,soft,intr,timeo=300,nolock,noatime,noauto,rw,nodev,exec,nosuid 0 0
LABEL=120gig /mnt/sdb ext3 users,user,noauto,atime,rw,nodev 0 0

drdosman 07-31-2007 12:04 AM

Not real familiar with the smb side of this, from what i have read, nfs and smb expect the network to stay up, not much avail in way of handling dropout connections. If you know u are going bring it down, you might try unmounting them prior to doing so...but for the work one where it may go down with no warning that wont help. That is about it for the extent of what I can provide without doing further reading.

did intr help at all?

DaveQB 07-31-2007 12:33 AM


Thats a real show stopper. I have used Windows on a regular basis for a few years now, but I don't recall this on that platform.

Maybe I should run some crons every 30 seconds or so, that checks for the network and if down, umounts with the lazy [-l] switch.


All times are GMT -5. The time now is 06:01 PM.