Difference between revisions of "Automount nfs4 mac osx"

From Asenjo
Jump to: navigation, search
m
 
Line 3: Line 3:
 
This info is valid for this mac osx version:
 
This info is valid for this mac osx version:
  
<code><pre>
+
<pre>
 
sw_vers
 
sw_vers
 
ProductName:    Mac OS X
 
ProductName:    Mac OS X
 
ProductVersion:    10.6.8
 
ProductVersion:    10.6.8
 
BuildVersion:    10K549
 
BuildVersion:    10K549
</pre></code>
+
</pre>
  
 
This is the only version I have handy ;-)
 
This is the only version I have handy ;-)
Line 15: Line 15:
  
 
* create automount map. I called it /etc/auto_foo:
 
* create automount map. I called it /etc/auto_foo:
<code><pre>
+
<pre>
 
$ cat /etc/auto_foo
 
$ cat /etc/auto_foo
 
*    -fstype=nfs,4.0alpha      192.168.0.184:/home/&
 
*    -fstype=nfs,4.0alpha      192.168.0.184:/home/&
</pre></code>
+
</pre>
  
 
* modify /etc/auto_master:
 
* modify /etc/auto_master:
<code><pre>
+
<pre>
 
$ cat /etc/auto_master
 
$ cat /etc/auto_master
 
#
 
#
Line 34: Line 34:
 
## extra maps
 
## extra maps
 
/nfs4              /etc/auto_foo
 
/nfs4              /etc/auto_foo
</pre></code>
+
</pre>
  
 
* create /nfs4 dir with root:wheel 755 permissions.
 
* create /nfs4 dir with root:wheel 755 permissions.
 
* restart automount:
 
* restart automount:
<code><pre>
+
<pre>
 
# automount -vc
 
# automount -vc
</pre></code>
+
</pre>
  
 
After that when you access a sub-folder of home under /nfs4/ it will be automounted.
 
After that when you access a sub-folder of home under /nfs4/ it will be automounted.

Latest revision as of 22:14, 28 August 2015


This info is valid for this mac osx version:

sw_vers
ProductName:    Mac OS X
ProductVersion:    10.6.8
BuildVersion:    10K549

This is the only version I have handy ;-)

to get mac osx to automount an nfsv4 share on a centos 6 server:

  • create automount map. I called it /etc/auto_foo:
$ cat /etc/auto_foo
*    -fstype=nfs,4.0alpha       192.168.0.184:/home/&
  • modify /etc/auto_master:
$ cat /etc/auto_master
#
# Automounter master map
#
+auto_master        # Use directory service
/net            -hosts        -nobrowse,hidefromfinder,nosuid
/home            auto_home    -nobrowse,hidefromfinder
/Network/Servers    -fstab
/-            -static

## extra maps
/nfs4              /etc/auto_foo
  • create /nfs4 dir with root:wheel 755 permissions.
  • restart automount:
# automount -vc

After that when you access a sub-folder of home under /nfs4/ it will be automounted.