On Mon, Mar 14, 2005 at 03:05:34PM -0600, Rob Brenart (TT) wrote: > This seems like one of those things that should be easy as can be, but > I'm not getting anywhere... so with the assumption that I'm just digging > myself in deeper and over thinking it, I'd like to pose the problem here > and ask for help. > > > The issue, I have several windows and a solaris box mounted from my > linux server, but due to network outages, power outages, stupid users > turning their servers off on occasion, etc... the mounts occasionally go > dead. As it stands, my solution to this is to go into the linux server, > umount and then mount the mount point. Then everything is good again, > until the next thing comes up. > > The solution I've been led towards, autofs > > Ok... going to boil this down to one machine and one share (I'll do a > windows one)... > > As it stands, in my /etc/fstab I have > > //machine/share /mnt/backups smbfs > credentials=/etc/fstabpwds/credfile,rw,user,gid=sambawrites,fmask=0774,d > mask=0774 0 0 > > Ok, now I've done an apt-get install autofs, and it went fine. I know > have two new files I believe I'm supposed to worry about. > /etc/auto.master & /etc/auto.misc > > So my auto.master looks like > > /misc /etc/auto.misc -timeout=60 #I know I don't want this kind of > timeout for my particular issues, but right now I just wanna get it > working at all > This tells the automounter to start a daemon waiting for requests on sub- directories of /misc, so > Then in my /etc/auto.misc I have > Backups -fstype=smbfs,login=<login>,passwd=<pwd> machine:/share > it would trigger mounting when someone tries to access /misc/Backups. > I should be using /etc/auto.mnt I think? With /mnt /etc/auto.mnt in the > my auto.master... but then can I define multiple points under /mnt when > I start adding others? It doesn't matter what the configuration file is called, but the first field of auto.master gives the base directory where all the mountable direc- tories are located... > I don't know at all if this machine:/share is the right syntax, it seems > to be what I find in the tutorials online, but most of them use > automount for local devices Hm, I'd suggest using the same syntax as in fstab, //machine/share. I think it's passed to mount without any preprocessing, so the syntax should be the same - but I don't know for sure. Try a few methods and check your syslog for strange output. :) > I'd also like to use a credential file in the auto.misc, but that's > another problem... like I say, right now I just want it to work. Should be no problem - those autofs-Maps take the same mount arguments as fstab (besides -fstype, which is special to autofs). > Am I supposed to remove my entry in the /etc/fstab? Yes, you can. Autofs will mount the directory without looking at fstab anyway (that's what it has its own configuration for (auto.master, auto.misc...). And you don't _want_ to mount that entry manually anymore. So, if you have /etc/auto.master: ----------------- /misc /etc/auto.misc -timeout=60 and /etc/auto.misc: --------------- Backups -fstype=smbfs,login=<login>,passwd=<pwd> machine:/share there should be something like root@__:/$ mount [...] automount(pid568) on /misc type autofs ([more options]) and trying to root@__:/$ cd /misc/Backups should either succeed (try 'mount' and 'ls' afterwards to see if the automounter daemon actually mounted something, and successfully) or throw some interesting output to syslog. HTH, Jan -- Jan C. Nordholz <jckn At gmx net>
Attachment:
signature.asc
Description: Digital signature