* Autofs 4 and 5 with nfs4
@ 2007-07-25 12:45 Howard Wilkinson
2007-07-27 9:23 ` Ian Kent
2007-08-03 4:09 ` Ian Kent
0 siblings, 2 replies; 6+ messages in thread
From: Howard Wilkinson @ 2007-07-25 12:45 UTC (permalink / raw)
To: autofs
[-- Attachment #1.1: Type: text/plain, Size: 958 bytes --]
I have a site that is currently using NFS4 for most of its traffic. We
have a mix of autofs4 and autofs5 clients. The following map is used to
provide access to host filing system exports
Auto.master:
/hosts auto.hosts
auto.hosts
* -fstype=nfs4,tcp,rsize=32768,wsize=32768,hard,intr,nodev,nosuid &:/
This works fine in both autofs4 and autofs5 if the client is not the
server (i.e. loopback ...) However with autofs5 this returns the root of
the local file system not the exported nfs4 root.
Is there a map syntax that would work round this? Ideally I would like
the map to be the same on all hosts, I can have different maps on the
autofs4 and autofs5 hosts easily but would not want to have a separate
map per host.
--
Howard Wilkinson
Phone:
+44(20)76907075
Coherent Technology Limited
Fax:
23 Northampton Square,
Mobile:
+44(7980)639379
United Kingdom, EC1V 0HL
Email:
howard@cohtech.com
[-- Attachment #1.2: Type: text/html, Size: 2795 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Autofs 4 and 5 with nfs4
2007-07-25 12:45 Autofs 4 and 5 with nfs4 Howard Wilkinson
@ 2007-07-27 9:23 ` Ian Kent
2007-08-01 18:50 ` Jeff Moyer
2007-08-03 4:09 ` Ian Kent
1 sibling, 1 reply; 6+ messages in thread
From: Ian Kent @ 2007-07-27 9:23 UTC (permalink / raw)
To: Howard Wilkinson; +Cc: autofs
On Wed, 2007-07-25 at 13:45 +0100, Howard Wilkinson wrote:
> I have a site that is currently using NFS4 for most of its traffic. We
> have a mix of autofs4 and autofs5 clients. The following map is used
> to provide access to host filing system exports
>
> Auto.master:
>
> /hosts auto.hosts
>
> auto.hosts
>
> *
> -fstype=nfs4,tcp,rsize=32768,wsize=32768,hard,intr,nodev,nosuid &:/
>
> This works fine in both autofs4 and autofs5 if the client is not the
> server (i.e. loopback ...) However with autofs5 this returns the root
> of the local file system not the exported nfs4 root.
Hahaha!!!
Yes, that's certainly something I didn't anticipate.
Historically, all local mounts are turned into bind mounts regardless of
the options specified. I can't think of an acceptable way to do this and
still use bind mounts so we need to consider under what conditions to
not mount local mounts as bind mounts.
I had a similar report recently and said that people expect that, if a
mount is local, it will be bind mounted for to give map independence.
So, this is a question for the list.
What do people think?
>
> Is there a map syntax that would work round this? Ideally I would like the map to be the same on all hosts, I can have different maps on the autofs4 and autofs5 hosts easily but would not want to have a separate map per host.
No there isn't.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Autofs 4 and 5 with nfs4
2007-07-27 9:23 ` Ian Kent
@ 2007-08-01 18:50 ` Jeff Moyer
2007-08-03 3:19 ` Ian Kent
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Moyer @ 2007-08-01 18:50 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
Ian Kent <raven@themaw.net> writes:
> On Wed, 2007-07-25 at 13:45 +0100, Howard Wilkinson wrote:
>> I have a site that is currently using NFS4 for most of its traffic. We
>> have a mix of autofs4 and autofs5 clients. The following map is used
>> to provide access to host filing system exports
>>
>> Auto.master:
>>
>> /hosts auto.hosts
>>
>> auto.hosts
>>
>> *
>> -fstype=nfs4,tcp,rsize=32768,wsize=32768,hard,intr,nodev,nosuid &:/
>>
>> This works fine in both autofs4 and autofs5 if the client is not the
>> server (i.e. loopback ...) However with autofs5 this returns the root
>> of the local file system not the exported nfs4 root.
>
> Hahaha!!!
>
> Yes, that's certainly something I didn't anticipate.
>
> Historically, all local mounts are turned into bind mounts regardless of
> the options specified. I can't think of an acceptable way to do this and
> still use bind mounts so we need to consider under what conditions to
> not mount local mounts as bind mounts.
>
> I had a similar report recently and said that people expect that, if a
> mount is local, it will be bind mounted for to give map independence.
>
> So, this is a question for the list.
> What do people think?
Remember the nosymlink option for automount? Well, that really meant,
"don't do special handling for local mount points." We could
introduce a similar option, though it would be hard to do so for only
the server.
>> Is there a map syntax that would work round this? Ideally I would
>> like the map to be the same on all hosts, I can have different maps
>> on the autofs4 and autofs5 hosts easily but would not want to have
>> a separate map per host.
>
> No there isn't.
Well, autofs4 might still honor nosymlink. I'd have to look.
-Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Autofs 4 and 5 with nfs4
2007-08-01 18:50 ` Jeff Moyer
@ 2007-08-03 3:19 ` Ian Kent
0 siblings, 0 replies; 6+ messages in thread
From: Ian Kent @ 2007-08-03 3:19 UTC (permalink / raw)
To: Jeff Moyer; +Cc: autofs
On Wed, 2007-08-01 at 14:50 -0400, Jeff Moyer wrote:
> Ian Kent <raven@themaw.net> writes:
>
> > On Wed, 2007-07-25 at 13:45 +0100, Howard Wilkinson wrote:
> >> I have a site that is currently using NFS4 for most of its traffic. We
> >> have a mix of autofs4 and autofs5 clients. The following map is used
> >> to provide access to host filing system exports
> >>
> >> Auto.master:
> >>
> >> /hosts auto.hosts
> >>
> >> auto.hosts
> >>
> >> *
> >> -fstype=nfs4,tcp,rsize=32768,wsize=32768,hard,intr,nodev,nosuid &:/
> >>
> >> This works fine in both autofs4 and autofs5 if the client is not the
> >> server (i.e. loopback ...) However with autofs5 this returns the root
> >> of the local file system not the exported nfs4 root.
> >
> > Hahaha!!!
> >
> > Yes, that's certainly something I didn't anticipate.
> >
> > Historically, all local mounts are turned into bind mounts regardless of
> > the options specified. I can't think of an acceptable way to do this and
> > still use bind mounts so we need to consider under what conditions to
> > not mount local mounts as bind mounts.
> >
> > I had a similar report recently and said that people expect that, if a
> > mount is local, it will be bind mounted for to give map independence.
> >
> > So, this is a question for the list.
> > What do people think?
>
> Remember the nosymlink option for automount? Well, that really meant,
> "don't do special handling for local mount points." We could
> introduce a similar option, though it would be hard to do so for only
> the server.
>
> >> Is there a map syntax that would work round this? Ideally I would
> >> like the map to be the same on all hosts, I can have different maps
> >> on the autofs4 and autofs5 hosts easily but would not want to have
> >> a separate map per host.
> >
> > No there isn't.
>
> Well, autofs4 might still honor nosymlink. I'd have to look.
Hahahah!
Well, it's still in the code but whether it still does what's intended
is another question. And then there's the name of the option.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Autofs 4 and 5 with nfs4
2007-07-25 12:45 Autofs 4 and 5 with nfs4 Howard Wilkinson
2007-07-27 9:23 ` Ian Kent
@ 2007-08-03 4:09 ` Ian Kent
2007-08-03 4:19 ` Ian Kent
1 sibling, 1 reply; 6+ messages in thread
From: Ian Kent @ 2007-08-03 4:09 UTC (permalink / raw)
To: Howard Wilkinson; +Cc: autofs
On Wed, 2007-07-25 at 13:45 +0100, Howard Wilkinson wrote:
> I have a site that is currently using NFS4 for most of its traffic. We
> have a mix of autofs4 and autofs5 clients. The following map is used
> to provide access to host filing system exports
>
> Auto.master:
>
> /hosts auto.hosts
>
> auto.hosts
>
> *
> -fstype=nfs4,tcp,rsize=32768,wsize=32768,hard,intr,nodev,nosuid &:/
>
> This works fine in both autofs4 and autofs5 if the client is not the
> server (i.e. loopback ...) However with autofs5 this returns the root
> of the local file system not the exported nfs4 root.
>
> Is there a map syntax that would work round this? Ideally I would like
> the map to be the same on all hosts, I can have different maps on the
> autofs4 and autofs5 hosts easily but would not want to have a separate
> map per host.
I had a look at the code which mounts these and it looks like if you
adding a port= option will force an NFS mount to be done.
Want to give it a try?
Historically the nosymlink would have had the same affect but, even
though the mount code looks for it it doesn't use it anymore. That may
not be such a bad thing given the name of the option and the fact that
it's not mentioned in the man pages. If this achieves what's needed then
I'd rather document the use of the port= option in the man pages and
keep the nosymlink a candidate for the chopping block.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Autofs 4 and 5 with nfs4
2007-08-03 4:09 ` Ian Kent
@ 2007-08-03 4:19 ` Ian Kent
0 siblings, 0 replies; 6+ messages in thread
From: Ian Kent @ 2007-08-03 4:19 UTC (permalink / raw)
To: Howard Wilkinson; +Cc: autofs
On Fri, 2007-08-03 at 12:09 +0800, Ian Kent wrote:
> > Is there a map syntax that would work round this? Ideally I would like
> > the map to be the same on all hosts, I can have different maps on the
> > autofs4 and autofs5 hosts easily but would not want to have a separate
> > map per host.
>
> I had a look at the code which mounts these and it looks like if you
> adding a port= option will force an NFS mount to be done.
>
> Want to give it a try?
>
> Historically the nosymlink would have had the same affect but, even
> though the mount code looks for it it doesn't use it anymore. That may
> not be such a bad thing given the name of the option and the fact that
> it's not mentioned in the man pages. If this achieves what's needed then
> I'd rather document the use of the port= option in the man pages and
> keep the nosymlink a candidate for the chopping block.
But I just noticed you'd like the same map for v4 and v5.
Also, on second thoughts, I need to at least continue to support it for
the sake of the v4 users.
Please try this patch and let me know if it resolves the problem.
Ian
---
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
index 25f72b9..e7a9a8a 100644
--- a/modules/mount_nfs.c
+++ b/modules/mount_nfs.c
@@ -214,7 +214,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
port_opt = strstr(nfsoptions, "port=");
/* Port option specified, don't try to bind */
- if (!port_opt && this->proximity == PROXIMITY_LOCAL) {
+ if (!nosymlink && !port_opt && this->proximity == PROXIMITY_LOCAL) {
/* Local host -- do a "bind" */
const char *bind_options = ro ? "ro" : "";
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-03 4:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 12:45 Autofs 4 and 5 with nfs4 Howard Wilkinson
2007-07-27 9:23 ` Ian Kent
2007-08-01 18:50 ` Jeff Moyer
2007-08-03 3:19 ` Ian Kent
2007-08-03 4:09 ` Ian Kent
2007-08-03 4:19 ` Ian Kent
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.