autofs not working properly now!

I used Autofs to auto mount some volumes on my NAS, they mounted and stayed that way no matter what. Now i lose the mount and sudo automount -vc no longer remounts. Totally *****.

Macbook Pro, Mac OS X (10.6.7)

Posted on Sep 21, 2016 2:48 PM

Reply
47 replies

Oct 10, 2016 11:10 AM in response to Linium

I also had the same problem after upgrading to Sierra.


I think I may have found the solution from https://forums.plex.tv/discussion/239074/how-to-fix-auto-mounting-shares-broken- in-sierra-macos#latest


I've tried mount to my home directory...so far so good. But if you try this big word of caution: mount to a sub-folder within your home directory. If you mount directly to your home directory it stops MacOS from being able to load your home directory - quite scary when I did it as it looks like everything is gone!


So, do NOT do this in your autofs file:


/Users/<username>/ auto_cifs

Doing the above mounts your 'share' as /Users/<username>/share but you lose the rest of the home directory!

Instead, do this:

/Users/<username>/tmp auto_cifs


This mounts it as /Users/<username>/tmp/share/


I've still got to do some testing but am hopeful yhis

Oct 14, 2016 5:48 AM in response to Linium

My update after some changes:


- I changed from afp to smb ... mounting is a bit quicker now

- I applied the Synology hotfix


On the surface now everything looks find, but automount is still broken.


I'm able to automount filesystems. They stay mounted and get unmounted after a while. So far, everything normal. BUT ... once the filesystem get's under load sooner or later (ranges from minutes to hours) this happens:


plex:~ plex$ mount

/dev/disk0s2 on / (hfs, local, journaled)

devfs on /dev (devfs, local, nobrowse)

map -hosts on /net (autofs, nosuid, automounted, nobrowse)

map auto_home on /home (autofs, automounted, nobrowse)

map auto_misc on /misc (autofs, automounted, nobrowse)

//plex@diskstation/Music on /misc/Music (smbfs, nodev, nosuid, read-only, automounted, nobrowse, mounted by plex)

plex:~ plex$ mount

/dev/disk0s2 on / (hfs, local, journaled)

devfs on /dev (devfs, local, nobrowse)

map -hosts on /net (autofs, nosuid, automounted, nobrowse)

map auto_home on /home (autofs, automounted, nobrowse)

map auto_misc on /misc (autofs, automounted, nobrowse)

//plex@diskstation/Music on /misc/Music (smbfs, nodev, nosuid, read-only, automounted, nobrowse)


The filesystem that was before mounted by plex changes it's owner: from one second to the other now root owns the filesystem and all permissions are changed accordingly:


plex:~ plex$ ls -lad /misc/Music

ls: /misc/Music: Permission denied

plex:~ plex$ sudo ls -lad /misc/Music

drwx------ 1 root wheel 16384 11 Sep 01:13 /misc/Music

plex:~ plex$

Nov 12, 2016 3:43 AM in response to Linium

Even though both to and from folders are entered correctly in couchpotato using the ridiculously long Automounter paths, Couchpotato returns the error below.


Apart from this, the mounts appear to be a lot more stable. I have only had one of my mounts disconnect randomly, but that has so far happened only once whilst using automounter.


Both the "To" and "From" folder have to exist

Nov 13, 2016 3:14 AM in response to Linium

After my earlier post, I found that mounting it to the home directory still did not work (lost connection after a while).


However, I have now edited my autofs.conf to add browse to the mount options. i.e.


AUTOMOUNTD_MNTOPTS=nosuid,nodev,browse

After 24hrs or so, I get a connection every time which is better than before. I'll post back if it fails. The only word of caution is as follows from this link. That said, so far no issues for me but I have only one mount.

[no]browse

This is an autofs specific option that is a pseudo

mount option and so is given without a leading dash.

Use of the browse option pre-creates mount point

directories for indirect mount maps so the map keys can

be seen in a directory listing without being mounted.

Use of this option can cause performance problem if the

indirect map is large so it should be used with

caution. The internal program default is to enable

browse mode for indirect mounts but the default

installed configuration overrides this by setting

BROWSE_MODE to "no" because of the potential

performance problem.

Dec 5, 2016 12:45 PM in response to Jouri

I had to increase the timeout to stop it ever timing out and unmounting (commenting it out might have the same end result). But essentially it continues to work for me.


When I say loss of functionality, I mean that the timeout is supposed to unmount the share after a period of inactivity - that is essentially lost. What I haven't done is see what happens when I am not on my network with this infinite timeout (e.g. will it cause a hang in Finder). I had problems in Linux of hanging (a long time back) but I do not believe MacOS has the same issue.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

autofs not working properly now!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.