Having trouble with explicit autofs mount
I am trying to create an explict mount, not a map, in auto.master. I'm finding no examples browsing the net. I have the following in my auto.master file:
Code:
/home/HPRS /etc/auto.domUsers --timeout 1200 Code:
ohprsstorage:/mnt/RAID/public /Xdrive nfs nfsvers=4,rw 0 0 Code:
Apr 1 13:01:37 labrat automount[16985]: mount_autofs_indirect: failed to read map for /Xdrive |
Hi,
Hoping that you have read the man pages related to autofs, why are you trying to not use a map bwith autofs ut an explicit mount, while autofs is effectively designed to work with map? Or maybe you what to do what is called a direct map with autofs. If so you are not doing it correctly, read the man pages to find out how. The error in /var/log/syslog complains about not seeing an expected map! |
Yes, I suppose I mean direct map. The reason I want to use a direct map is that on a different (production) computer I used a map for the /mnt mountpoint, but had other non-autofs folders manually mounted (nfs) under /mnt configured in /etc/fstab. It turned out that autofs and these manual mounts under /mnt interfered with each other. So, I'm trying to find a solution that doesn't map all of /mnt.
I did read the man page and searched for online examples, but couldn't find the answer (possibly because I didn't use the right search term). Can you offer a suggestion based on my example? |
Hi,
Try, check (because I haven't) and test the below. /etc/auto.master: /- /etc/auto.direct /etc/auto.direct: /Xdrive -fstype=nfs,rw,nfsvers=4 ohprsstorage:/mnt/RAID/public |
Hi,
You can also divide /mnt in several dedicated subfolders. /mnt/auto/local/ /mnt/auto/remote/ /mnt/fstab/ /mnt/manual/ /mnt/nfs/ /mnt/cifs/ /mnt/tmp/ |
Quote:
Quote:
We'll see ... |
Well, this is working horribly! After putting the following in /etc/auto.master on the production server WEBSERVER:
/- /etc/auto.direct --timeout=3600 and the follow in /etc/auto.direct: /mnt/public -fstype=nfs,rw,nfsvers=4 ohprsstorage:/mnt/RAID/public It appears to work on the WEBSERVER host. But, this same folder, in addition to being nfs exported from OHPRSSTORAGE, is also samba shared by OHPRSSTORAGE for the benefit of Windows workstations. After doing the automount as configured above, all of the Windows workstations lost their samba maps, even their maps to linux hosts other than OHPRSSTORAGE! And I could not re-map the drive (forgot to note the actual error). Also, when I went to use RSAT on an unrelated matter, I got a message saying it could not find the domain controller. After removing the autofs configuration, putting back the nfs mount in /etc/fstab and rebooting both WEBSERVER and OHPRSSTORAGE, everything was back to normal; Windows workstations were able to see the samba maps without me having to re-map; RSAT started working again. This all appeared to work fine on my Ubuntu workstation, although access from that to the ohprsstorage:/mnt/RAID/public volume is rare, so possibly not a thorough test. Differences between working and trashing configurations: Working: Ubuntu 15.10, automount version 5.1.1, nothing else mounted under /Xdrive Not working: Slackware 14.1, automount version 5.0.7, other volumes mounted under /mnt I couldn't find anything describing the differences between version 5.1.1 and 5.0.7. Any ideas? |
Hi,
Unfortunately, I have never tried to share a folder both by NFS and Samba. My suggestion is: drop NFS and get all the machines (Windows and Linux) use Samba to access the folder. |
Quote:
Although ... My main issue is that e.g. when WEBSERVER and OHPRSSTORAGE both reboot at similar times (for example, after a power failure), if WEBSERVER comes up first, the nfs mount is tried once. If OHPRSSTORAGE is not there when it tries, it never mounts the exported folder, which is very bad. OHPRSSTORAGE has to be up first and the mountpoint exported. I'm not sure Samba has this problem. I'll try mounting using Samba instead of NFS, doing that reboot test, and verifying that Samba will eventually see the mount. Having not done Samba mounts to Linux before, does this look correct for the fstab entry? ohprsstorage:/public /mnt/public cifs defaults 0 0 (also, I might try putting the autofs mountpoint somewhere other than /mnt with NO OTHER volumes mounted thereunder. I do like the 'unmount after period of no activity' feature of autofs) |
I did try doing the autmount again. It just seemed to me that the problems with Windows workstations losing the share, and esp. RSAT not finding the domain controller had to be coincidental -- don't see how autofs could mess all that up.
So, I tried again with that same config described in your 04-03-16, 05:09 AM post. So far, it's working. No network-wide trashing of mounts. It's been over 24 hours, however there is little user activity on the weekends. I've done some web-researching on nfs versus cifs and I've found nothing conclusive other than nfs seem more suitable (and efficient?) for Linux clients and cifs is more suitable for Windows client. Some people thought it a bad idea to mix, others saw no problem. As I've been running Samba and NFS mixed for several years, I think I'll just leave it this way. The nuance here is using autofs to auto-mount/unmount the NFS directory rather than leave it always mounted ... if that works! |
Hi,
I think it is also possible to have Samba automount with autofs. Google a little for it. |
I'm back with more autofs issues ... I have the following setup on Slackware64 14.1:
/etc/auto.master Code:
/- /etc/auto.direct Code:
/mnt/public -fstype=nfs,rw,nfsvers=4 ohprsstorage:/mnt/RAID/public Code:
TIMEOUT=3600 /- /etc/auto.direct -- --timeout 3600 and /- /etc/auto.direct --timeout=3600 in /etc/auto.master, but nothing seems to work. What am I doing wrong? |
All times are GMT -5. The time now is 03:58 PM. |