smbmount problems when mounted share goes offline.

Green, Todd tgreen at
Wed May 31 20:57:53 GMT 2000

>Date:   Wed, 31 May 2000 11:02:58 -0400
>From:   "Reid Sutherland" <reid at>
>To:     <samba at>
>Subject: smbmount problems when mounted share goes offline.
>Message-ID: <000901bfcb11$4ee0c860$d250dfd8 at>
>MIME-Version: 1.0
>Content-Type: text/plain;
>ontent-Transfer-Encoding: 7bit
>using samba-2.0.7 on Debian Linux 2.2.15)
>  I'm wondering how do I get around the problem when you smbmount a share
>a win32 machine and that machine reboots, the mount becomes a blackhole. If
>you attempt an 'ls', 'df' or anything that would access that mount point
>program then goes into a state of void and cannot be killed, leaving the
>proc open until reboot (another way?) and the mount "busy".
>  Any suggestions on how to unmount the share and remount it (remount
>readonly?)? I'm not much into testing this since it requires me to use a
>production server. Also, I've since made the kernel smbfs a module. Will
>that help? Just rmmod it if it blackholes?

This is similar to my previous complaint of the NT servers 'timing out' my
smbmount connections and smbmount not auto-reconnecting.

My solution to this problem was to create a script which monitorings the
smbmount'd partitions using df.  If I get an error (I/O or Broken Pipe are
what I've seen) the script will unmount the drive and do a mount -a to
remount it.

Originally I would run this check script once every thirty minutes and I
would get notifications that it was having to remount the drives throughout
the day and night.  I then changed it to check every five minutes to see if
I could get a better idea when it's happening, but the result is a
'heartbeat' to the NT server every five minutes as I do a df on the drive.
Since I switched to 5 minute checks I hardly ever see the mount point down
and have to remount.

Now I realize this isn't exactly what your describing, but the other
advantage to this script is that if for some reason the NT server(s) get
rebooted or otherwise drop their shares my script will automatically remount
the drives for me.

I've attached the perl script and a sample data file.

Note: The script assumes that you have setup the mounts in your /etc/fstab
file so that mount -a would remount them for you.

Let me know if you have any questions.

BTW I think I spoke with you via phone a few months back on a hacker

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_nt_mounts.dat
Type: application/octet-stream
Size: 26 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 1250 bytes
Desc: not available
Url :

More information about the samba mailing list