Having trouble with auto_master in 10.1

Hi,

I am trying to mount my CD drive via autofs()/auto_master() in FreeBSD 10.1.

I am following the auto_master() man page which states the following to automount the CD drive: cd -intr,fstype=cd9660 :/dev/cd0. It doesn't work and gives me the following error when trying to access the mountpoint as specified in /etc/auto_master:
Code:
automountd[958]: failed to handle special map "-intr,fstype=cd9660"
I'm a little confused because in the man page, it goes on to say that for special maps, only -hosts and -null are supported. Does this mean the example in the man page with the special map of -intr is wrong?
 
Hi,

I think the CD drive example from the auto_master() manual page is intended to be used in a /etc/auto_example child map instead of the main auto_master file. In that context, -intr is not a special map but a mount option. It allows the mount process to be interrupted in case of failure.

Besides this, I've been trying to mount an SMB (CIFS) share using autofs, but didn't succeed: is smbfs even supported? If so, what syntax should I use in child maps? I tried the following combinations but none of them worked:
Code:
myshare     //user@server/myshare
myshare     //user@server:/myshare
myshare     ://user@server/myshare
myshare     \/\/user@server/myshare
myshare     \/\/user@server:/myshare
myshare     //server/myshare
myshare     //server:/myshare
Thanks!
 
First of all - yes, just like the Sun automounter, there are always two levels of configuration: auto_master refers to individual map files, and those files contain actual mount information. Perhaps the manual page could be clearer about this.

Now, regarding the smbfs - the third one should be okay, but you need to specify the fstype, like this:

Code:
myshare -fstype=smbfs,-N ://user@server/myshare
Try it. If it doesn't work, the general way of debugging this is like this: kill the automountd (pkill -KILL automountd), then start it in the foreground ( while :; do automountd -d; done), then do something to trigger the mount. The debug messages should give you a clue what's wrong. If they don't - please paste them here.
 
I was using sysutils/automount from the ports system to automount USB flash drives on my laptop. The automount that is now included in the base seems to be something entirely different. The man pages for it are short on examples.

Is there a better instruction set somewhere for how to set it up?
 
OK. Everything works fine with SMB shares now. I did not use a while loop to invoke automountd with the -d parameter. As a result, the daemon exited just after being started, and autofs just couldn't work.

I added
Code:
autofs_enable="YES"
to /etc/rc.conf to launch automountd/autoumountd automatically at system startup.

Thanks for your help!
 
As it is now, they are two totally different things. There is a fundamental difference in their modus operandi: sysutils/automount is to mount local media when it's physically attached. Autofs' purpose is to mount pretty much anything when it's accessed. I've talked to Vermaden, sysutils/automount's author, about how to join our efforts to get the best from both, and I believe I have a pretty good plan, but no actual code yet.

As for instruction set - I'm not very good at writing documentation, so you might want to consult the documentation for autofs in other systems, e.g. Solaris (https://docs.oracle.com/cd/E23824_01/html/821-1454/rfsrefer-75.html); some details might differ, but from the user point of view it's very similar.
 
First of all - yes, just like the Sun automounter, there are always two levels of configuration: auto_master refers to individual map files, and those files contain actual mount information. Perhaps the manual page could be clearer about this.

Thanks for your reply. Yes, I realised that after re-reading the man page a few more times.

I have it working now with my USB flash drive without the -intr option, which still gives me errors. Without it, my USB drive mounts fine. So is the -intr in the man page wrong?
 
Back
Top