0

I'm trying to figure out why macOS clients reboots when accessing files on a NFS home directory automounted from a CentOS 7 server. The exact same configuration works very well with CentOS 6 NFS servers.

On the CentOS 7 server :

# cat /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted

# systemctl stop firewalld

# cat /etc/exports
/export mac.corp.org(rw,insecure)

# systemctl enable nfs
# systemctl start nfs

# showmount -e
Export list for c7.corp.org:
/export   mac.corp.org

# id jdoe
uid=1001(jdoe) gid=1001(jdoe) groups=1001(jdoe)

On the macOS client (ElCapitan or Sierra):

# cat /etc/auto_home
jdoe -fstype=nfs,vers=4,sec=sys,proto=tcp,resvport,soft,intr,rsize=32768,wsize=32768,nosuid,rw c7.corp.org:/export/&

# id jdoe
uid=1001(jdoe) gid=1001(jdoe) groups=20(staff),701(com.apple.sharepoint.group.1),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh-disabled) 

# su - jdoe
Password:

# pwd
/home/jdoe

# 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)
c7.corp.org:/export/jdoe on /home/jdoe (nfs, nodev, nosuid, automounted, nobrowse)

# vim non-existant_file.txt
:q

This simple "open/close" with VI makes macOS crash and reboot without writing anything in /private/var/log/system.log .

Does anyone know how to fix my issue ?

Fravadona
  • 103
  • 3

1 Answers1

1

The fix is to configure autofs to use nfs v3. Osx has a broken nfsv4 implementation and Apple is not in a hurry to fix it.

 jdoe -fstype=nfs,vers=3,sec=sys,proto=tcp,resvport,soft,intr,rsize=32768,wsize=32768,nosuid,rw c7.corp.org:/export/&
kofemann
  • 4,626
  • 1
  • 25
  • 30
  • Indeed, NFSv3 works so that's the way to go for most people but that's not usable in my configuration though. My corp's firewall between subnets blocks most of the ports needed for NFSv3. Is there no other possibility ? – Fravadona Oct 11 '17 at 15:23