![]() |
| |||
| On Fri, 31 Mar 2006 14:23:33 -0500, Dances With Crows <danSPANceswitTRAPhcrows@gmail.com> wrote: > On Fri, 31 Mar 2006 11:13:05 -0500, John-Paul Stewart staggered into the > Black Sun and said: >> The Natural Philosopher wrote: >>> Keith Keller wrote: >>>> On 2006-03-30, Ignoramus27088 <ignoramus27088@NOSPAM.27088.invalid> >>>> wrote: >>>>> What I do want though, is to ensure that these mounts [of SMB >>>>> filesystems] would survive reboots of the server and that they would >>>>> auto-reconnect if something goes bad temporarily. >>>>> 1) How to detect when a samba mount is stale. > > No idea, though there's got to be something you can do. Periodic > pinging of the machine will let you know if it's on the LAN or not. > Periodic attempts to stat a file shared via SMB will let you know if SMB > is up. > >>>>> 2) Is there some system flag to automatically remount the shared >>>>> drives, or ... >> //server/share /mnt/somewhere smbfs auto,user=me 0 0 >> //server/share /mnt/somewhere autofs defaults 0 0 >> >> The first example will automatically mount the smbfs filesystem at >> boot time. The second example, where the *filesystem* type is >> specified as *autofs* is (I believe) what Keith was referring to when >> he suggested automount. > > FWIW, the behavior Ignoramus wanted wrt SMB may be automatic. On an > older Linux machine here, I have an fstab line like so: > > //prod2/d /mnt/prod2 smbfs auto,user=prod1,password=SECRET, > workgroup=workgroup,uid=1000,gid=100 0 0 > > ...PROD2 is running an up-to-date 'Doze2K. Cutting off sharing on > PROD2/D made all attempts to access /mnt/prod2 from the Linux machine > fail (of course). Turning sharing back on made things work OK on the > Linux machine, and I didn't have to remount anything. I don't have time > to reboot prod2 right now though. > > It's highly likely that the Samba developers allowed for the possibility > that Windows machines would have to be rebooted occasionally, and made > recovery from that as transparent as possible. ICBW. Just to add some alternate empirical evidence, I've seen more than one samba mount go deaf (says mounted, but no access works) even though there were no changes on the server. Never had a lot of time to find out why or even replicate predictably. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |