smbmount problems when mounted share goes offline.
Green, Todd
tgreen at appgenesys.com
Wed May 31 20:57:53 GMT 2000
>Date: Wed, 31 May 2000 11:02:58 -0400
>From: "Reid Sutherland" <reid at isys.ca>
>To: <samba at samba.org>
>Subject: smbmount problems when mounted share goes offline.
>Message-ID: <000901bfcb11$4ee0c860$d250dfd8 at isys.ca>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>ontent-Transfer-Encoding: 7bit
>
>using samba-2.0.7 on Debian Linux 2.2.15)
>
>Hi,
>
> I'm wondering how do I get around the problem when you smbmount a share
on
>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
the
>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?
>
>Thanks.
>
>-reid
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
problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_nt_mounts.dat
Type: application/octet-stream
Size: 26 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20000531/a7a908c7/check_nt_mounts.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_nt_mounts.pl
Type: application/octet-stream
Size: 1250 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20000531/a7a908c7/check_nt_mounts-0001.obj
More information about the samba
mailing list