NFSv4 loopback mount issues when mounting more than one localhost:/
Marc Tamsky
marc at tamsky.com
Wed May 16 00:36:12 EDT 2007
Hello all,
I am loopback mounting two different NFS4 exports, sourced from two
different servers, both over an SSH tunnel:
(ssh remotehost1 -L 4444:localhost:2049)
(ssh remotehost2 -L 5555:localhost:2049)
They are being mounted as:
mount localhost:/ /nfs/remotehost1 -t nfs4 -o port=4444
mount localhost:/ /nfs/remotehost2 -t nfs4 -o port=5555
Mounting either one by itself succeeds without error.
When I try to mount the second localhost:/ volume, the mount command
exits without error, and a mount entry gets added to the system.
But, when inspected it is a duplicate of the first localhost:/ mount,
instead of the second host's tree.
If I change the order of operations, the other export mounts
correctly, and the duplication still occurs when the second attempt to
mount an nfs4 localhost:/ occurs.
All these commands are being done manually, not from init scripts.
I can bypass the problem using a tcp bounce forwarder:
I created an xinetd service that does the following:
listen for connections on: tcp/127.0.0.2:5555,
when someone connects, run 'nc 127.0.0.1 5555'
Then everything works as expected if I use two different server
addresses for the mount command.
one at 127.0.0.1:/ the other on 127.0.0.2:/
It feels like the nfs4 engine believes that all mount requests with
the same address (but having different port= options) are the same host?
What subsystem is confused here?
my system info:
# uname -a
Linux wiggum 2.6.9-42.0.8.EL #1 Tue Jan 30 12:10:22 EST 2007 i686 i686 i386 GNU/Linux
# rpm -q yum centos-release
yum-2.4.3-1.c4
centos-release-4-4.2
this is equivalent to RHEL-4 update 2.
Thanks,
Marc.
More information about the NFSv4
mailing list