|
Apple Mac Mini
How-to
|
Configuring NFS
For my desktop Mac (running Mac OS X),
I'd like to be able to access my home directory on the Mini
easily from the Finder.
The way to do this having the fastest file transfers it to use
NFS.
Configuring the server
First, you need the following packages installed:
apt-get install nfs-common nfs-kernel-server portmap
Then, to export directories via NFS,
add them to the file /etc/exports.
For the Mini, I have:
| /home/login |
*.domain.com(insecure,no_root_squash,rw,sync) |
| /tftpboot |
*.domain.com(insecure,no_root_squash,sync) |
The first line exports my home directory.
(The second exports the Linux filesystem for my
Rio music player.)
Then restart the NFS server by doing:
/etc/init.d/nfs-kernel-server reload
To test, try to connect from the Finder:
-
From the Go menu,
select Connect to Server....
-
For Server Address,
enter: nfs://mini/home/login
-
Click Connect.
If everything works, a server icon will appear on the desktop.
If you get an error, check the log files on the Mini.
Configuring the Mac OS X client
There are two kinds of NFS mounts:
-
Dynamic:
these are the kind normally used under Mac OS X,
i.e., you connect to a server and disconnect when done.
-
Static:
the server is connected upon boot
and stays connected all the time.
Since I want my home directory on the Mini always available,
I configured a static mount.
There are two parts to doing this:
-
Create the directory to be the NFS mount point.
-
Create the static NFS mount entry.
To create the directory to be the NFS mount point,
simply do:
mkdir -p /private/mnt/mountpoint
(The directory can be named anything you want;
it just has to match the name in the table below.)
To create the static NFS mount entry,
you can use Apple's NetInfo Manager:
-
Launch NetInfo Manager.
-
Authenticate by clicking the lock icon
and entering your password.
-
Select mounts.
-
From the Directory menu,
select New Subdirectory.
-
Edit the value of the name property
to be as shown in the table below.
-
For the remaining two properties shown in the table,
from the Directory menu,
select New Property
then edit them to the correct values.
| name |
|
mini:/home/login |
| dir |
/private/mnt/mountpoint |
| type |
nfs |
To make Mac OS X notice
the new NFS mount without rebooting, do:
kill -1 `cat /var/run/automount.pid`
Static NFS mounts don't appear on the desktop,
so I simply created an alias for the directory
and placed it on the desktop.
|