Good morning guys,
Saesh has asked me, if I’ve tried using NFS from FreeBSD and OS X as client. Well, I had it in mind, but haven’t tested it yet. So, yesterday morning I gave it a try.
NFS comes integrated in FreeBSD 7.1 (which is the system that I use on the fileserver). All you have to do to start it up are those steps:
Add those 3 lines to your /etc/rc.conf
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"
Next, create your own /etc/exports in the format:
/storage 192.168.0.123
This will allow the client with the IP 192.168.0.123 to access the fileserver’s share (path: /storage) via NFS. Also in Leopard, NFS is built it, but there are a few more steps to do before you can try to log on.
Most important: Check if nfsd (NFS daemon) is running yet, if so – kill the processes.
# ps axu | grep nfsd
root 8918 0.0 0.0 4604 1380 ?? Is 2:30PM 0:00.03 nfsd: master
root 8919 0.0 0.0 4604 1072 ?? I 2:30PM 0:35.74 nfsd: server
root 8920 0.0 0.0 4604 1072 ?? I 2:30PM 0:18.33 nfsd: server
root 8921 0.0 0.0 4604 1072 ?? I 2:30PM 0:16.56 nfsd: server
root 8922 0.0 0.0 4604 1072 ?? I 2:30PM 0:16.20 nfsd: server
root 25658 0.0 0.0 5928 1220 p0 R+ 8:05AM 0:00.00 grep nfsd
# kill -9 8918 8919 8920 8921 8922
Ok – now you’re ready for the final initialization
# /etc/rc.d/mountd onereload
# rpcbind
# nfsd -u -t -n 4
# mountd -r
That’s it. Check your sharepoints with a simple
# showmount -e
Exports list on localhost:
/storage 192.168.0.123
You should be now able to mount your NFS share from OS X Leopard. But now, my problems begin. I’m currently now able to read/write from Leopard. Why? Well, I’m sure it’s again the every-time-killing-my-nerves user rights that annoys me here again.
But, slowly. On the Mac, press CMD+K, when you’ve selected the Finder. A popup will appear.
Mounting this should work and you will possibly get the following message, which means, that you don’t have rights to access this folder (*sigh*
)
At the finder, it looks like this (do you see the little red sign inside the icon?).
What I’ve done is to create a new “share” or “export” in the /etc/exports of my Backup drive (2x 200GB which is more a testdrive with ZFS RAIDz1, too). I set the complete Volume to
# chmod 777 -R /backup
Then I mount it (don’t forget to)
# /etc/rc.d/mountd onereload
before you mount! Otherwise you will not be able to mount
Looks like it works, ha? Yes – a bit. I can now access the Backup Volume and copy a file from this share to my harddisk to test the speed. I’ve fixed the connection between the home office (attic) and the basement (server rack), so full 1GBit/s is available. I was able to copy the files with a rate of 70-80MByte/s from the server to the local disk inside my Mac.
That’s damn fast and a lot lot faster than SMB.
The bad thing is, I’m not able to write files onto this disk. Yes – since “chmod 777″ allows me, I’m able to create folders and also copy files to the disc, but I’m not able to use them. Let me show you an example:
I drag a file from my desktop to this share (fully “777″!)

You possibly need to identify yourself as root… (short version)

The file that you want to copy contains at least one object wherefor you have just the rights to read. Do you want to copy that file?

Well, finally it’s placed and looks good…

…but to open it, won’t work “The file you are trying to open is damaged or the format is unknown”
Uh! Nice message for a simple PNG file, isn’t it? Well, that’s the point where I am at the moment. The NFS server is running, but I can’t really access my files. Sure, I can open the already stored files without problems, but adding new? Currently not possible.
Oh well, I found examples like this for the /etc/exports (mostly for Linux):
/storage 192.168.0.0/24(rw,sync,insecure)
This allows everyone from the 192.168.0.x network to access those files with read/write permissions. Insecure is a command that should work with Leopard. Nice! I tried it, but when I type “showmount -e” afterwards (and after refreshing mountd), I see NO shares, also Leopard is no more able to mount anything.
Ideas and help is really appreciated
Ciao
Dennis
Tweet This Post
Digg This
Facebook
Reddit