auto-remount a failed NT mount?

Urban Widmark urban at
Sat Jun 24 12:58:05 GMT 2000

On Sat, 24 Jun 2000, John W. Lemons III wrote:

> I'm having a problem where NT users are rebooting (go figure) their
> machines, and breaking mounts from that machine.  What I'd like to do
> is either configure my SAMBA stuff correctly to recover these mounts
> automatically, or write a script to umount/mount them for me when they
> fail.  The problem I'm having it, how do I tell that a mount has died
> so I can remount it?  I'd assume there is a call of some form I can
> use in a shell script that will tell me the status of a mount.  Ideas?

You are using smbfs(smbmount) to mount NT shares on your linux box? If
not, you can stop reading now and ignore this email ... :)

(Oh, good ... still reading)

The idea is that smbmount should try to remount the share when accessing
the share and the connection have been lost, whatever the reason. For
example if the server threw it away, but also if the server reboots.

I believe there is a small bug in smbmount in 2.0.7 that prevents this
from working. If you try to access the share while the server is down
smbmount will terminate.

You could try the patch below. Note that I haven'tactually tested this vs
an NT going down, but I have vs a samba server stopping and starting.

Let me know if that solves your problem.


More information about the samba mailing list