Home arrow Latest Tutorials arrow Mount a FreeBSD partition on OSX via NFS
Mount a FreeBSD partition on OSX via NFS PDF
Wednesday, 25 September 2013
Let's say you have a Mac running OSX and you want to access a partition from your FreeBSD server and work on that partition like it is a local partition on OSX. For that we will use NFS. FreeBSD will be configured as NFS server and OSX as a NFS client.

Steps to do on FreeBSD machine (NFS Server)

Step 1A
-----------
Add the following lines to your FreeBSD /etc/rc.conf

# ----------- add this to rc.conf ------
nfs_server_enable="YES"
mountd_flags="-r"
rpcbind_enable="YES"
rpc_statd_enable="YES"
rpc_lockd_enable="YES"
# ----------- end ------------------------


Step 2A. Add the directories we want to share to /etc/exports file
------------------------------------------------------------------------------------------
/usr/home/fileserver/drive 10.0.0.30 10.0.0.40 (rw,no_wdelay, no_root_squash, insecure, anonuid=501, anongid=100)


This will export /usr/home/fileserver/drive directory and allow other systems to access this partition as with root permisions.

10.0.0.30 and 10.0.0.40 are machines that are allowed to mount NFS server resources.


Step 3A. Start the NFS Server
------------------------------------------
Do the following steps from command line (using root priviledges)

 rpcbind
 nfsd -u -t -n 4
 mountd -r

Important! After you change /etc/exports file you must reload mountd service.
You can acompilish that by doing:

/etc/rc.d/mountd onereload

After you've followed all steps when debuging it is useful to look in /var/log/messages, usualy if something is not properly configured, messages from there will help you to debug easily.


Steps to do on OSX machine (NFS Client)

Step 1B. Mount NFS partition/directory on OSX

mkdir ~/nfs_mount
sudo mount -t nfs 10.0.0.10:/
/usr/home/fileserver/drive ~/nfs_mount


Last Updated ( Wednesday, 25 September 2013 )
 
Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?