Re: PATCH: Support binding to a local IPv4 address when mounting a server.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2009-02-21 at 21:52 -0800, Ben Greear wrote:
> Chuck Lever wrote:
> > Hi Ben-
> >
> > On Feb 21, 2009, at Feb 21, 2009, 2:43 AM, Ben Greear wrote:
> >> I re-worked the kernel nfs local-address-binding logic against 
> >> 2.6.29-rc5.  In quick testing,
> >> this works with IPv4 and NFSv3 at least.  I changed the attribute to 
> >> be called 'bindaddr'
> >> as previously suggested.
> >>
> >> I didn't actually make any further changes to the mount.nfs tool and 
> >> it took the bindaddr=a.b.c.d
> >> just fine, so maybe there are no changes at all needed in user-space.
> >
> > You probably want the code in support/nfs/getport.c to send requests 
> > from your bindaddr, if the mount command has to contact the server to 
> > renegotiate mount options.
> 
> Any clue as to which part of this code to modify and how to test if it 
> actually
> does anything useful?
> 
> >>
> >>     /* Don't talk to strangers */
> >> -    clp = nfs_find_client(svc_addr(rqstp), 4);
> >> +    clp = nfs_find_client(svc_daddr(rqstp), svc_addr(rqstp), 4);
> >
> > It's not clear to me why the callback server needs to be aware of the 
> > mount point's bind address.  Can you explain this a little more?  I 
> > would think the bind address would be pertinent for sending callback 
> > service replies, but I don't see code here to do that.
> I want to have a unique mount per local IP, so if I mount the same 
> server from 1.1.1.1 and from 1.1.1.2, I
> want two unique mounts.  I believe the way to do this is to 
> differentiate based on the IP addr,
> which is what this code is supposed to be doing.

You can already do that using the -onosharecache option.

I really dislike this idea of adding routing information at the sunrpc
level. So, I repeat: what is the application for all this? I've heard
mutterings about routing and multi-homed servers, but absolutely zero in
the way of specific applications and requirements.

Why can't you for instance do exactly the same thing, simply by setting
up two separate local networks; one for each NIC?

Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux