[olug] Auto remount a windows share when connection is broken

Ryan Stille ryan at cfwebtools.com
Tue Apr 1 18:14:16 UTC 2008


I don't know if that first paragraph wasn't exactly clear...  I am 
mounting a share from my Linux box to a windows share. Like:

mount -t smbfs -o 
uid=99,gid=99,fmask=666,dmask=777,username=foo,password=bar    
//192.168.1.1/shared_dir    /tmp/shared_dir

-Ryan


Ryan Stille wrote:
> I am using smbmount to mount a windows share on my linux server.  
> Sometimes the connection gets severed somehow, and running umount and 
> smbmount again fixes it.
>
> Is there a way to have this happen automatically?  Put it in fstab and 
> tell it to always keep the connection up or something?
>
> My plan B is to have a perl script run every minute, check the mount and 
> if its down unmount it and remount it.  This won't be simple though 
> because I think the check may hang depending on how 'down' (severity) 
> the mount is...
>
> -Ryan
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug
>   





More information about the OLUG mailing list