Skip to main content

Mounting nfs share on Mac

Mounting nfs share on Mac

Through The Finder

Accessing an NFS share with the Mac OS X Finder is simple. Select Go -> Connect to Server... in the Finder. In the Address box, enter the location of the NFS share as follows nfs:// servername /path/to/share. So if your server's name is taco and the share is /exports/media, you would use the address nfs://taco/exports/media. The Finder will then access the share and mount it on your desktop. An important note here is that the Finder uses an unprivileged port to do this, which may not work with some NFS server configurations.

Through The Mount Command

To use the mount command to mount a share, open the Terminal application. Enter the command sudo /bin/mount_nfs servername: /path/to/share _/private/mnt/point_, replacing the italicized sections with the necessary values. This command will also use an unprivileged port by default, but you can force a privileged port with the -P switch.



Using the automount Daemon

For more permanent mounts, you'll want to configure the automount daemon to handle mounting NFS automatically. On Mac OS X, automount uses NetInfo? to acquire its mounts and parameters. Below are the commands to use to create the necessary data in NetInfo? . As always, replace the values below with those appropriate of your NFS server.

% sudo niutil -create . /mounts
% sudo niutil -create . /mounts/temp
% sudo niutil -createprop . /mounts/temp type 'nfs'
% sudo niutil -createprop . /mounts/temp dir ' _/private/mnt/point_ '
% sudo niutil -createprop . /mounts/temp opts ''
% sudo niutil -createprop . /mounts/temp name ' _servername:/path/to/share_ '


Once you complete these commands, you must signal the automount daemon that a change has occurred. To do this, enter the command

sudo killall -HUP automount.

This configuration also uses an unprivileged port by default. To use a privileged port instead, issue the command

sudo nicl . create /mounts/ servername:\\/ path \\/ to \\/share opts "-P".

Note that the path is escaped using two backslashes preceding each forward slash. Remember to HUP automount after any changes.


Note :

You might face problem in not able to mount the NFS shares exported from a linux box sometimes this is due to mac trying to mount the share through random port. If you want fix this problem then open the /etc/exports file on the linux server where you have exported the nfs share and add " insecure " key to the share config. as below

/mynfs-share *(rw,no_root_squash,sync,insecure,no_subtree_check)

Then try mounting the nfs share again on your mac. This time it should munt successfully.

Comments

Popular posts from this blog

How to find firmware or boot ROM version in Mac OS X

Firmware and boot ROM version of your mac can be found in two ways. Way 1 : 1. From "Apple" menu , choose "About This Mac" menu item. 2. Click " More Info " to open "System Profiler" application. 3. Under Contents -> Select Hardware Tree item. On the right side panel Under hardware overview section, we can see Boot ROM Version and SMC (Firmware) Version. Way 2 : Run the below command in terminal to get boot ROM version and SMC(firmware) version : $ system_profiler SPHardwareDataType | grep -i "Version" | awk -F ':' '{print $1 $2}'

How to enable root login in gnome on Debian 6 or 7

Root user login in gnome is disabled on Debian system by default for security reasons. If you want to enable it for specific reasons then follow the below steps : 1. Login into Debian system 2. launch the Root Terminal from Applications -> Accessories. 3. Authenticate with password to launch the Root Terminal. 4. Open "/etc/pam.d/gdm3" with vi.          #vi /etc/pam.d/gdm3 5. Look for "auth     required     pam_succeed_if.so  user  != root   quiet_success"  , comment it out as below.     #auth     required     pam_succeed_if.so  user  != root   quiet_success 6. Save the modification with Esc+w+q+Enter keystroke. 7. Restart or reboot Debian system. 8. Login with root user in gnome. You should be now able to login successfully.   

How to setup Redhat cluster and GFS2 on RedHat Enterprise Linux 6 on Vmware ESXi

1)     Installing RHEL6 on Vmware esxi  with clustering packages . a)     Creating a RedHat Enterprise Linux 6.0 Virtual image. i)       Open vSphere Client by connecting to a Vmware ESXi Server. ii)     Login into your vSphere Client iii)    Goto File -> New -> Virtual Machine (VM). iv)    Select Custom option in Create New Virtual Machine Window and click Next v)   Give a name to the virtual machine(VM) ( In my case name of my virtual machine is – RHEL6-ClusterNode1) and click next. vi)    Select a resource pool where you want your VM to  reside ( In my case , I have created a      resource pool named RHEL6-Cluster.) and click Next. vii)  Select a datastore  to store your VM files  and Click Next. viii) Select VM version which is suitable for your environment.( In my case VM version is 7) and click Next. ix)   Specify ...