Post by michaelwerthwe have some success with this but not all...
assuming you have exported the fs on the server and allowed the IP range
for your client on the client machine system disk root create a folder to map the server
to. call it for example theshare on the client machine add this line near the end of /etc/rc
before exit 0
/sbin/mount_nfs -s -P servername:/somewhere/foldertoshare /theshare
When I do this I can't mount any disks when I reboot my Mac. It seems to
get stuck when it tries to mount the nfs I guess...
Post by michaelwerthwhen you boot up the map should work.... but when i set it up it was r/w
and now it's read-only :(
I am still struggling with this. I'm rather new to this and it is hard
for me to tell if the problem is on the server side or the client side
(or both). Is there a way to determine whether a server is working
correctly as an nfs server? Without using the client to test it?
This is a FreeBSD server version 4.7. IP address is 192.168.0.64.
The client is a Mac OS X machine that has IP 192.168.0.1 when it is
offline or a DHCP assigned IP address when it is online. The two are
connected via ethernet. The connection is working; I can log in with ssh
from the Mac to the FreeBSD server, I can FTP and I can view websites
hosted on the FreeBSD server. To do this I have to go offline and
assign the IP 192.168.0.1 to the Mac.
(Wouldn't it be possible to also connect to these services on the FreeBSD
box while I'm using the IP assigned by my ISP via DHCP? But that's a
whole other can of worms, I guess I need to run a DNS to do that, right?)
Anyway, the FreeBSD box is not connected to the internet. To make it
work as a nfs server I entered the following lines in /etc/rc.conf:
portmap_enable="YES"
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
mountd_flags="-r"
and the following in /etc/exports:
/usr/home/myname 192.168.0.1 XXX.XX.XX.X
This should do it, right? This should make it a nfs server after reboot,
or am I missing something?
When I check for more clues if it is actually working I do:
Bash: ~# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100005 3 udp 1023 mountd
100005 3 tcp 1023 mountd
100005 1 udp 1023 mountd
100005 1 tcp 1023 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100024 1 udp 1011 status
100024 1 tcp 1022 status
Bash: ~# ps -aux | grep -E "nfsiod|nfsd|mountd|portmap"
daemon 64 0.0 0.8 956 636 ?? Is 10:43PM 0:00.04
/usr/sbin/portmap
root 66 0.0 0.5 524 352 ?? Is 10:43PM 0:00.03 mountd -r
root 68 0.0 0.3 368 196 ?? Is 10:43PM 0:00.02 nfsd: master (nfsd)
root 70 0.0 0.2 360 184 ?? I 10:43PM 0:00.01 nfsd: server (nfsd)
root 71 0.0 0.2 360 184 ?? I 10:43PM 0:00.00 nfsd:server (nfsd)
root 72 0.0 0.2 360 184 ?? I 10:43PM 0:00.00 nfsd:server (nfsd)
root 73 0.0 0.2 360 184 ?? I 10:43PM 0:00.00 nfsd:server (nfsd)
Are there more ways to check if it is working correctly that I should
know of?
The Mac is configured as a nfs client; I added the following to /etc/rc:
nfs_client_enable="YES"
nfs_client_flags="-n 4"
created a directory to mount in:
mkdir /Users/myname/Server
created the a directory under the mount directory in NetInfoDatabase
with the following values:
Bash: ~# niutil -read . 54
vfstype: nfs
dir: /Users/myname/Server
name: 192.168.0.64:/usr/home/myname
opts: rw
As I understand it this is equivalent to a fstab file with:
192.168.0.64:/usr/home/myname /Users/myname/Server nfs rw 0 0
When automount on the Mac is off and I try to mount nfs with:
sudo mount -a -t nfs
I don't get my prompt back and nothing seems to happen.
When I reboot with automount on I get a forever spinning beachball when
I try to open the directory where the volume is supposed to mount.
I hope somebody, anybody has an idea, maybe I'm missing something that's too
obvious? Thanks,
Steven
--
***@sifre.nl