Automount fails with "key "xxxx" not found in map source(s)"
Seems CentOS7 keeps me in the forums today.
I am attempting to automount my windows share using this howto. I am following method four. I got my systems so I can easily mount the shares via the command line using ether the ip or the hostname of the windows system. The command I am using is: Code:
mount -t cifs //host.name/share -o username=username,password=password /network/pc I followed the instructions in the howto exactly (well, I changed names and such where needed). Here is my auto.network file that my auto.master points to: Code:
host.name -fstype=cifs,rw,noperm,user=user,pass=pass ://host.name/share Code:
automount[2084]: key "Users" not found in map source(s). I googled the error message but came up with a wide array of issues. I don't know where to begin. Any suggestions? |
Ok. So I think I solved it. I had a few things wrong
First, anyone who has this problem should turn on logging in /etc/sysconfig/autofs. I just changed it from off to verbose and that gave me a lot more information to go on in log\messages. 1. I was pointing towards my media hard drive, D$ (:\\host.name\D$) autofs DOES NOT like the $. It was trying to mount \\host.name\D and failing. So I created an actual share for the drive "media" and that solved that 2. The second part of this is sort of weird and I do not understand it yet, but autofs is very picky about where you mount to. I wanted to mount to /network/host.name. The plan was to have automounts for all the networked pc's. I created the directories and that is what I listed in the /etc/auto.master. However, when I removed host.name and made it just /network, the mount worked flawlessly and even mounted the host.name directory as I originally intended. :scratch: All in all, the automount feature needs more documentation. I am quite proficient with the googles but could not come up usable information and examples of syntax that helped at all. It was turning the logging on and trial and error that got this working and I am concerned about the next share I am going to set up. I would not exactly call this "solved", more like "issue resolved for the time being". But I will hit the button anyway. Hope this helps someone |
The /net/ trick
Just saw this, and think it needs an explanation.
For 2. ensure your /etc/auto.master has Code:
/net -hosts -nosuid,nobrowse The -hosts (special option) means: a reference to /net/HOSTNAME will issue a Code:
showmount -e HOSTNAME Knowing the server names in your network you can access everything they export through /net/ |
Automount fails - how i fixed mine
so I was getting the key failures on my NIS?NFS client:
4:~$ sudo systemctl status autofs automount[930]: key "var" not found in map source(s). automount[930]: key "other" not found in map source(s). I ripped out the direct mapping changes I had made and reloaded the autofs service . Once the automount key errors stopped and I was cleanly running autofs on the client, I went to to the NIS server and verified it also was starting autofs cleanly. At this point I went to /etc/ypsrc/ and modified the auto.home file by adding the the line 'toybox <servername>:mnt/toybox'. Once that was done I ran /var/yp/make This allows the NFS mount to automount to '/home/toybox' correctly. So what ever ma[ping you have created is incorrect for your mount and need backed out and retried. |
All times are GMT -5. The time now is 05:09 AM. |