4

I'm trying to set up automounting of user home directories using NFSv4 on Mac clients.

Everything appears to work as expected except for logins via the Mac GUI. These hang with a spinning cursor.

Details

The systems are Mac OS 10.13.3 clients with a Centos 7 NFS server. The server has ZFS storage and we are using the ZFS internal NFS configuration, but since we see the same behaviour on a different server (Centos 6 with ext4 filesystems and standard linux nfs implementation) I'm ruling out ZFS as the problem for now.

On the clients /etc/auto_master is:

# Automounter master map
+auto_master            # Use directory service
/net                    -hosts          -nobrowse,nosuid
/home                   auto_home
/Network/Servers        -fstab
/-                      -static

and /etc/auto_home is:

myhome -vers=4,sec=sys myserver:/mypool/myhome

The server and clients all authenticate to an AD server.

What works:

  • Using NFS v3 instead of v4 everything works as expected. We have used this configuration with 100+ Mac and Linux clients for many years.
  • Using NFSv4, manual mounting from the command line works. ( mount -o vers=4 myserver:/mypool/myhome /home/myhome )
  • Using v4 automounting from the command line works. ( ls -ald ~joeuser automounts the home directory)
  • Using v4 automounting the home directory at login when logging in over ssh works.

What doesn't work:

Automounting the home directory at login from the Mac GUI (ie a normal Mac login) hangs the client with a spinning cursor.

No relevant messages show up in the server logs, but the client logs show:

Feb  8 13:41:24 myclient KernelEventAgent[99]: tid 54485244 received event(s) VQ_NOTRESP (1)
Feb  8 13:41:24 myclient KernelEventAgent[99]: tid 54485244 type 'nfs', mounted on '/home/myhome', from 'myserver:/mypool/myhome', not responding
Feb  8 13:41:24 myclient KernelEventAgent[99]: tid 54485244 found 1 filesystem(s) with problem(s)

Checking the hung client by sshing in we see that the automount has been successful

myclient:~ admin$ nfsstat -m
/home/myhome from myserver:/mypool/myhome
  -- Original mount options:
     General mount flags: 0x500018 nodev,nosuid,automounted,nobrowse
     NFS parameters: vers=4,sec=sys
     File system locations:
       /mypool/myhome @ myserver (aaa.bbb.ccc.ddd)
  -- Current mount parameters:
     General mount flags: 0x4500018 nodev,nosuid,automounted,nobrowse multilabel
     NFS parameters: vers=4.0,tcp,port=2049,hard,nointr,noresvport,callback,negnamecache,nonamedattr,noacl,noaclonly,locks,noquota,rsize=32768,wsize=32768,readahead=16,dsize=32768,nordirplus,nodumbtimr,timeo=10,maxgroups=16,acregmin=5,acregmax=60,acdirmin=5,acdirmax=60,nomutejukebox,noephemeral,nonfc,sec=sys
     File system locations:
       /mypool/myhome @ myserver (aaa.bbb.ccc.ddd)
     Status flags: 0x0

So it appears that its not the automount mechanism thats at fault.

Our linux clients have the same automount configuration and work as expected with no problems.

Next steps

I'm seeking advice on how to troubleshoot this further. What next steps would you take?

  • 1
    Check your firewall. – Michael Hampton Feb 08 '18 at 18:47
  • 1
    Excellent point. I should have mentioned that for the purposes of this test the firewalls are turned off on both the client and the server. – Dave Robertson Feb 08 '18 at 21:06
  • 1
    You're doing NFSv4 over TCP and timing out. That's a firewall so frequently that I'd check for firewalls _again_. Not just on the NFS server, but any other network firewalls that might exist between client and server. Failing that I'd check to make sure that IP routes correctly between client and server in both directions. – Michael Hampton Feb 08 '18 at 21:09
  • I too experience same scenario(s), were you able to resolve the specific one - mac gui issue with nfs4 mounts? If so could you please share the details. – kam Jun 10 '21 at 06:30
  • Hi kam, no we have still not managed to solve this. I am about to do some testing with the new MacOS 12 Monterey, and I would still like to find a solution... – Dave Robertson Jun 21 '21 at 23:03

0 Answers0