9.1 VM nfs3 & locks over VPN
Rick Romero
rick at havokmon.com
Fri Oct 11 14:54:45 UTC 2013
So let me explain my environment -
I have 1 FreeBSD 7.1 server, multiple Linux boxes, and a FreeBSD 9.0
server. The 9.0 server is providing NFS3 mounts to all the other systems.
I've built a remote VM (FreeBSD 9.1 offered by Hosting provider), and
connected it to my network via OpenVPN. I copied my rc.conf from 9.0
server to 9.1 in order to grab the proper requirements for mount NFS3, and
it worked fine until I ran my lock test (perl script). Which really sucks
because I've already gotten just about everything else I need working :(
I cannot get a lock from any OS on this side of the VPN. There are no
errors logged anywhere, and adding rpcbind_flags="-l -L" just tells me that
the local servers are contacted.
Oct 11 09:43:58 nl101 rpcbind: connect from 172.16.1.21 to
getport/addr(mountd)
Oct 11 09:44:07 nl101 rpcbind: connect from 172.16.1.21 to dump()
Oct 11 09:44:15 nl101 rpcbind: connect from 172.16.1.21 to
getport/addr(nfs)
Oct 11 09:44:16 nl101 rpcbind: connect from 172.16.1.21 to
getport/addr(mountd)
Oct 11 09:44:21 nl101 rpcbind: connect from 172.16.1.21 to
getport/addr(nlockmgr)
Yes lockd is running and the logs show a connection is made to it. I even
tried binding rpcbind to just the VPN IP.
What I couldn't do was enable debugging, the -d flag just caused rpcbind to
hang.
So I'm currently here:
nfs_server_enable="YES"
nfs_server_flags=" -u -t -n12"
nfs_client_enable="YES"
portmap_enable="YES"
mountd_enable="YES"
mountd_flags=" -r"
rpcbind_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
rpcbind_flags=" -l -L"
#rpc_lockd_flags="-h 10.9.8.6"
#rpc_statd_flags="-h 10.9.8.6"
rpcinfo -p 9.0server
and
rpcinfo -p 9.1server match
program vers proto port service
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
100000 4 local 111 rpcbind
100000 3 local 111 rpcbind
100000 2 local 111 rpcbind
100005 1 udp 994 mountd
100005 3 udp 994 mountd
100005 1 tcp 994 mountd
100005 3 tcp 994 mountd
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100024 1 udp 1016 status
100024 1 tcp 1016 status
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100021 0 udp 611 nlockmgr
100021 0 tcp 726 nlockmgr
100021 1 udp 611 nlockmgr
100021 1 tcp 726 nlockmgr
100021 3 udp 611 nlockmgr
100021 3 tcp 726 nlockmgr
100021 4 udp 611 nlockmgr
100021 4 tcp 726 nlockmgr
I'm kinda lost. I tried getting NFSv4 working, but I couldn't mount the
test export....
nfsv4_server_enable="YES"
nfsuserd_enable="YES"
nfs_client_enable="YES"
/nlsysvol/home -maproot=vpopmail -network 172.16.1.0 -mask 255.255.255.0
V4: /mnt
/mnt/first -maproot=root: -network 172.16.1.0 -mask 255.255.255.0
The problem with using v4 is that I don't want to upgrade my 7.1 box - it
just works as is :) But if that's what I have to do, then that's what I
have to do.
Can someone give me a push in the right direction? I've been fighting
this for a full day now.
Here's my perl lock script -
#!/usr/bin/perl
use Fcntl qw(:flock);
my $lock_file = 'lockfile';
open(LOCKFILE,">>$lock_file") or die "Cannot open $lock_file: $!\n";
print "Opened file $lock_file\n";
flock(LOCKFILE, LOCK_SH) or die "Can't get shared lock on $lock_file:
$!\n";
print "Got shared lock on file $lock_file\n";
sleep 2;
close LOCKFILE;
print "Closed file $lock_file\n";
exit;
More information about the freebsd-questions
mailing list