2008-11-07 18:15:00

by Sev Binello

[permalink] [raw]
Subject: [NFS] export dir thru 2 diff path names

Can anyone tell me if it's ok to export the same file system
through 2 different paths ( one is a link) ?

Thanks
-Sev

--

Sev Binello
Brookhaven National Laboratory
Upton, New York
631-344-5647
[email protected]


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs



2008-11-12 18:02:59

by Murata, Dennis

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

One last question for the maintainers and the community. Is this viewed
as an undocumented feature or a bug to be fixed? I would hate to
recommend use of the exported link, only to have it disabled by an
updated patch.

Wayne

> -----Original Message-----
> From: J. Bruce Fields [mailto:[email protected]]
> Sent: Monday, November 10, 2008 2:45 PM
> To: Chuck Lever
> Cc: Murata, Dennis; [email protected]; Sev Binello
> Subject: Re: [NFS] export dir thru 2 diff path names
>
> On Mon, Nov 10, 2008 at 03:20:42PM -0500, Chuck Lever wrote:
> > On Nov 10, 2008, at Nov 10, 2008, 2:28 PM, J. Bruce Fields wrote:
> >> On Mon, Nov 10, 2008 at 11:28:04AM -0800, Murata, Dennis wrote:
> >>> That really is the 64K question. During my initial testing, I
> >>> exported the parent directory. Now I am explicitly exporting the
> >>> installation directories, where I see the exportfs
> message. In the
> >>> messages log file on the server the mount request from
> the client is
> >>> always the actual directory.
> >>
> >> I don't see how this would be "unsafe"--if it works, go for it.
> >>
> >> One potential trap: it's using the same client list and export
> >> options for both, so if you think you can make one of them
> read-only
> >> and one of them writeable, for example, you'll be disapointed.
> >
> > I wonder how this behaves on the client side. If the same client
> > mounts both paths, will it recognize that these are the
> same and use a
> > shared page cache for both?
>
> Yeah, who knows. I suspect it assumes they're different if
> the mount paths are different.
>
> But for most people's purposes it probably doesn't matter
> much. (For the purposes people have mentioned so far they
> don't even need to mount both paths from the same client at once.)
>
> --b.
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 20:21:57

by Chuck Lever III

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Nov 10, 2008, at Nov 10, 2008, 2:28 PM, J. Bruce Fields wrote:
> On Mon, Nov 10, 2008 at 11:28:04AM -0800, Murata, Dennis wrote:
>> That really is the 64K question. During my initial testing, I
>> exported
>> the parent directory. Now I am explicitly exporting the installation
>> directories, where I see the exportfs message. In the messages log
>> file
>> on the server the mount request from the client is always the actual
>> directory.
>
> I don't see how this would be "unsafe"--if it works, go for it.
>
> One potential trap: it's using the same client list and export options
> for both, so if you think you can make one of them read-only and one
> of
> them writeable, for example, you'll be disapointed.

I wonder how this behaves on the client side. If the same client
mounts both paths, will it recognize that these are the same and use a
shared page cache for both?

> --b.
>
>>
>> Wayne
>>
>>> -----Original Message-----
>>> From: Sev Binello [mailto:[email protected]]
>>> Sent: Monday, November 10, 2008 1:04 PM
>>> To: Murata, Dennis
>>> Cc: J. Bruce Fields; [email protected]
>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>
>>> Hi -
>>> Yeah, I see.
>>> So it actually looks like you can do this.
>>> I'm not 100% sure if safe --though it looks it -- so I'll
>>> probably not use it for this application.
>>>
>>> Thanks
>>> -Sev
>>>
>>> Murata, Dennis wrote:
>>>> That is correct, exportfs only shows the actual directory.
>>> The client
>>>> seems to be able to mount the directory with either.
>>>>
>>>> Wayne
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Sev Binello [mailto:[email protected]]
>>>>> Sent: Monday, November 10, 2008 12:51 PM
>>>>> To: Murata, Dennis
>>>>> Cc: J. Bruce Fields; [email protected]
>>>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>>>
>>>>> Murata, Dennis wrote:
>>>>>
>>>>>> I just tested this on a SL4.7 (RHEL 4.7 variant) using a
>>>>>>
>>>>> RHEL 4.4 nfs
>>>>>
>>>>>> server. I did get the messages from exportfs about
>>>>>>
>>>>> duplicate export
>>>>>
>>>>>> entries. On the client I was able to mount both the
>>>>>>
>>>>> symlink and the
>>>>>
>>>>>> actual directory. They look like separate mounts. There are two
>>>>>> entries in /proc/mounts and in /etc/mtab, one with the actual
>>>>>> directory path, one with the symlink path. I am using
>>>>>>
>>>>> autofs to mount
>>>>>
>>>>>> the directories, not hardcoded. Are you using newer
>>> distributions?
>>>>>>
>>>>>>
>>>>> I tested on RHEL 4.6.
>>>>> Interesting that you can still mount either one.
>>>>> On the server an exportfs only shows the real path as exported.
>>>>>
>>>>>
>>>>>> What problems will I cause by doing this? I am using the
>>>>>>
>>>>> symlink path
>>>>>
>>>>>> as the installation path for an application. The idea is a newer
>>>>>> version can be installed into a different directory, then after
>>>>>> testing the symlink will be changed to the new
>>> installation. Other
>>>>>> applications that reference the application will always use the
>>>>>> symlink path, as well as any user scripts.
>>>>>>
>>>>>> Wayne
>>>>>>
>>>>>>
>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: [email protected]
>>>>>>> [mailto:[email protected]] On Behalf Of Sev
>>>>>>> Binello
>>>>>>> Sent: Monday, November 10, 2008 11:06 AM
>>>>>>> To: J. Bruce Fields; [email protected]
>>>>>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>>>>>
>>>>>>> J. Bruce Fields wrote:
>>>>>>>
>>>>>>>
>>>>>>>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Well the simplest approach doesn't work.
>>>>>>>>> i.e put symb link and actual path in the export file & try
>>>>>>>>>
>>>>>>>>>
>>>>>>> exporting
>>>>>>>
>>>>>>>
>>>>>>>>> it Exportfs dereferences the link and states that
>>>>>>>>>
>>>>>>>>>
>>>>>>> duplicates are not allowed.
>>>>>>>
>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> OK, makes sense.
>>>>>>>>
>>>>>>>> You could mount --bind the filesystem at the other location
>>>>>>>>
>>>>>>>>
>>>>>>> instead of
>>>>>>>
>>>>>>>
>>>>>>>> symlinking.
>>>>>>>>
>>>>>>>> The filehandles given to the client will be the same
>>>>>>>>
>>>>> across the two
>>>>>
>>>>>>>> exports. If you mount both from the same client,
>>>>>>>>
>>>>> behavior may vary
>>>>>
>>>>>>>> across different clients (for example, as to whether they
>>>>>>>>
>>>>>>>>
>>>>>>> attempt to
>>>>>>>
>>>>>>>
>>>>>>>> share caches between the two), but I think it'd work.
>>>>>>>>
>>>>>>>> (The question "why??!!??" does come to mind, though.)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> Need to make a path change to how file systems are mounted and
>>>>>>> exported on the servers This then required a wholesale change to
>>>>>>> clients so they mount the correct path.
>>>>>>> Not an issue for linux.
>>>>>>> But since we don't administer windows pcs and they also
>>> mount the
>>>>>>> same file system, wanted to see if we could let them
>>> stay the way
>>>>>>> they were for now.
>>>>>>>
>>>>>>> We're just going to go ahead and have to coordinate this with
>>>>>>> windows guys.
>>>>>>>
>>>>>>> -Sev
>>>>>>>
>>>>>>>
>>>>>>>> --b.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> -Sev
>>>>>>>>>
>>>>>>>>> J. Bruce Fields wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Can anyone tell me if it's ok to export the same file system
>>>>>>>>>>> through 2 different paths ( one is a link) ?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> I actually don't know. You could try it and tell us what
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> you find
>>>>>>>
>>>>>>>
>>>>>>>>>> out....
>>>>>>>>>>
>>>>>>>>>> If you're exporting something *containing* the symlink
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> and expecting
>>>>>>>
>>>>>>>
>>>>>>>>>> the client to traverse into the filesystem, be aware that
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> symlinks
>>>>>>>
>>>>>>>
>>>>>>>>>> over NFS are actually interpreted (and followed) on the
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> client--so
>>>>>>>
>>>>>>>
>>>>>>>>>> they're interpreted as *client-side* paths, not server-side.
>>>>>>>>>>
>>>>>>>>>> If the path you're exporting is itself a symlink--it probably
>>>>>>>>>> depends on how nfs-utils treats symlinks found in
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> /etc/exports. I'd
>>>>>>>
>>>>>>>
>>>>>>>>>> have to try it or check the code.
>>>>>>>>>>
>>>>>>>>>> Another way to export the filesystem in two different
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> places would
>>>>>>>
>>>>>>>
>>>>>>>>>> be with mount --bind.
>>>>>>>>>>
>>>>>>>>>> --b.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Sev Binello
>>>>>>>>> Brookhaven National Laboratory
>>>>>>>>> Upton, New York
>>>>>>>>> 631-344-5647
>>>>>>>>> [email protected]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> --------------------------------------------------------------
>>>>>>> -----------
>>>>>>> This SF.Net email is sponsored by the Moblin Your Move
>>> Developer's
>>>>>>> challenge Build the coolest Linux based applications with
>>>>>>>
>>>>> Moblin SDK
>>>>>
>>>>>>> & win great prizes Grand prize is a trip for two to an
>>> Open Source
>>>>>>> event anywhere in the world
>>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>>>> _______________________________________________
>>>>>>> NFS maillist - [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/nfs
>>>>>>> _______________________________________________
>>>>>>> Please note that [email protected] is being
>>>>>>> discontinued.
>>>>>>> Please subscribe to [email protected] instead.
>>>>>>> http://vger.kernel.org/vger-lists.html#linux-nfs
>>>>>>>
>>>>>>> --
>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>
>>>>> linux-nfs"
>>>>>
>>>>>>> in the body of a message to [email protected] More
>>>>>>>
>>>>> majordomo
>>>>>
>>>>>>> info at http://vger.kernel.org/majordomo-info.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> --
>>>>>
>>>>> Sev Binello
>>>>> Brookhaven National Laboratory
>>>>> Upton, New York
>>>>> 631-344-5647
>>>>> [email protected]
>>>>>
>>>>>
>>>>>
>>>
>>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
> _______________________________________________
> Please note that [email protected] is being discontinued.
> Please subscribe to [email protected] instead.
> http://vger.kernel.org/vger-lists.html#linux-nfs
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs"
> in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 20:45:29

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Mon, Nov 10, 2008 at 03:20:42PM -0500, Chuck Lever wrote:
> On Nov 10, 2008, at Nov 10, 2008, 2:28 PM, J. Bruce Fields wrote:
>> On Mon, Nov 10, 2008 at 11:28:04AM -0800, Murata, Dennis wrote:
>>> That really is the 64K question. During my initial testing, I
>>> exported
>>> the parent directory. Now I am explicitly exporting the installation
>>> directories, where I see the exportfs message. In the messages log
>>> file
>>> on the server the mount request from the client is always the actual
>>> directory.
>>
>> I don't see how this would be "unsafe"--if it works, go for it.
>>
>> One potential trap: it's using the same client list and export options
>> for both, so if you think you can make one of them read-only and one
>> of
>> them writeable, for example, you'll be disapointed.
>
> I wonder how this behaves on the client side. If the same client mounts
> both paths, will it recognize that these are the same and use a shared
> page cache for both?

Yeah, who knows. I suspect it assumes they're different if the mount
paths are different.

But for most people's purposes it probably doesn't matter much. (For
the purposes people have mentioned so far they don't even need to mount
both paths from the same client at once.)

--b.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-09 15:59:34

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
> Can anyone tell me if it's ok to export the same file system
> through 2 different paths ( one is a link) ?

I actually don't know. You could try it and tell us what you find
out....

If you're exporting something *containing* the symlink and expecting the
client to traverse into the filesystem, be aware that symlinks over NFS
are actually interpreted (and followed) on the client--so they're
interpreted as *client-side* paths, not server-side.

If the path you're exporting is itself a symlink--it probably depends on
how nfs-utils treats symlinks found in /etc/exports. I'd have to try it
or check the code.

Another way to export the filesystem in two different places would be
with mount --bind.

--b.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 15:57:20

by Sev Binello

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

Well the simplest approach doesn't work.
i.e put symb link and actual path in the export file & try exporting it
Exportfs dereferences the link and states that duplicates are not allowed.

-Sev

J. Bruce Fields wrote:
> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>
>> Can anyone tell me if it's ok to export the same file system
>> through 2 different paths ( one is a link) ?
>>
>
> I actually don't know. You could try it and tell us what you find
> out....
>
> If you're exporting something *containing* the symlink and expecting the
> client to traverse into the filesystem, be aware that symlinks over NFS
> are actually interpreted (and followed) on the client--so they're
> interpreted as *client-side* paths, not server-side.
>
> If the path you're exporting is itself a symlink--it probably depends on
> how nfs-utils treats symlinks found in /etc/exports. I'd have to try it
> or check the code.
>
> Another way to export the filesystem in two different places would be
> with mount --bind.
>
> --b.
>


--

Sev Binello
Brookhaven National Laboratory
Upton, New York
631-344-5647
[email protected]


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 16:50:44

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
> Well the simplest approach doesn't work.
> i.e put symb link and actual path in the export file & try exporting it
> Exportfs dereferences the link and states that duplicates are not allowed.

OK, makes sense.

You could mount --bind the filesystem at the other location instead of
symlinking.

The filehandles given to the client will be the same across the two
exports. If you mount both from the same client, behavior may vary
across different clients (for example, as to whether they attempt to
share caches between the two), but I think it'd work.

(The question "why??!!??" does come to mind, though.)

--b.

>
> -Sev
>
> J. Bruce Fields wrote:
>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>>
>>> Can anyone tell me if it's ok to export the same file system
>>> through 2 different paths ( one is a link) ?
>>>
>>
>> I actually don't know. You could try it and tell us what you find
>> out....
>>
>> If you're exporting something *containing* the symlink and expecting the
>> client to traverse into the filesystem, be aware that symlinks over NFS
>> are actually interpreted (and followed) on the client--so they're
>> interpreted as *client-side* paths, not server-side.
>>
>> If the path you're exporting is itself a symlink--it probably depends on
>> how nfs-utils treats symlinks found in /etc/exports. I'd have to try it
>> or check the code.
>>
>> Another way to export the filesystem in two different places would be
>> with mount --bind.
>>
>> --b.
>>
>
>
> --
>
> Sev Binello
> Brookhaven National Laboratory
> Upton, New York
> 631-344-5647
> [email protected]
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 17:07:55

by Sev Binello

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

J. Bruce Fields wrote:
> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
>
>> Well the simplest approach doesn't work.
>> i.e put symb link and actual path in the export file & try exporting it
>> Exportfs dereferences the link and states that duplicates are not allowed.
>>
>
> OK, makes sense.
>
> You could mount --bind the filesystem at the other location instead of
> symlinking.
>
> The filehandles given to the client will be the same across the two
> exports. If you mount both from the same client, behavior may vary
> across different clients (for example, as to whether they attempt to
> share caches between the two), but I think it'd work.
>
> (The question "why??!!??" does come to mind, though.)
>
>
Need to make a path change to how file systems are mounted and exported
on the servers
This then required a wholesale change to clients so they mount the
correct path.
Not an issue for linux.
But since we don't administer windows pcs and they also mount the same
file system,
wanted to see if we could let them stay the way they were for now.

We're just going to go ahead and have to coordinate this with windows guys.

-Sev
> --b.
>
>
>> -Sev
>>
>> J. Bruce Fields wrote:
>>
>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>>>
>>>
>>>> Can anyone tell me if it's ok to export the same file system
>>>> through 2 different paths ( one is a link) ?
>>>>
>>>>
>>> I actually don't know. You could try it and tell us what you find
>>> out....
>>>
>>> If you're exporting something *containing* the symlink and expecting the
>>> client to traverse into the filesystem, be aware that symlinks over NFS
>>> are actually interpreted (and followed) on the client--so they're
>>> interpreted as *client-side* paths, not server-side.
>>>
>>> If the path you're exporting is itself a symlink--it probably depends on
>>> how nfs-utils treats symlinks found in /etc/exports. I'd have to try it
>>> or check the code.
>>>
>>> Another way to export the filesystem in two different places would be
>>> with mount --bind.
>>>
>>> --b.
>>>
>>>
>> --
>>
>> Sev Binello
>> Brookhaven National Laboratory
>> Upton, New York
>> 631-344-5647
>> [email protected]
>>
>>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 18:09:08

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Mon, Nov 10, 2008 at 12:05:52PM -0500, Sev Binello wrote:
> J. Bruce Fields wrote:
> > OK, makes sense.
> >
> > You could mount --bind the filesystem at the other location instead of
> > symlinking.
> >
> > The filehandles given to the client will be the same across the two
> > exports. If you mount both from the same client, behavior may vary
> > across different clients (for example, as to whether they attempt to
> > share caches between the two), but I think it'd work.
> >
> > (The question "why??!!??" does come to mind, though.)
> >
> >
> Need to make a path change to how file systems are mounted and exported
> on the servers
> This then required a wholesale change to clients so they mount the
> correct path.
> Not an issue for linux.
> But since we don't administer windows pcs and they also mount the same
> file system,
> wanted to see if we could let them stay the way they were for now.

Oh, OK, so you just to export at both paths just as a way to do a
gradual migration of clients from one to the other. Fine.

--b.

>
> We're just going to go ahead and have to coordinate this with windows guys.
>
> -Sev
> > --b.
> >
> >
> >> -Sev
> >>
> >> J. Bruce Fields wrote:
> >>
> >>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
> >>>
> >>>
> >>>> Can anyone tell me if it's ok to export the same file system
> >>>> through 2 different paths ( one is a link) ?
> >>>>
> >>>>
> >>> I actually don't know. You could try it and tell us what you find
> >>> out....
> >>>
> >>> If you're exporting something *containing* the symlink and expecting the
> >>> client to traverse into the filesystem, be aware that symlinks over NFS
> >>> are actually interpreted (and followed) on the client--so they're
> >>> interpreted as *client-side* paths, not server-side.
> >>>
> >>> If the path you're exporting is itself a symlink--it probably depends on
> >>> how nfs-utils treats symlinks found in /etc/exports. I'd have to try it
> >>> or check the code.
> >>>
> >>> Another way to export the filesystem in two different places would be
> >>> with mount --bind.
> >>>
> >>> --b.
> >>>
> >>>
> >> --
> >>
> >> Sev Binello
> >> Brookhaven National Laboratory
> >> Upton, New York
> >> 631-344-5647
> >> [email protected]
> >>
> >>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
> _______________________________________________
> Please note that [email protected] is being discontinued.
> Please subscribe to [email protected] instead.
> http://vger.kernel.org/vger-lists.html#linux-nfs
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 18:10:26

by Murata, Dennis

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

I just tested this on a SL4.7 (RHEL 4.7 variant) using a RHEL 4.4 nfs
server. I did get the messages from exportfs about duplicate export
entries. On the client I was able to mount both the symlink and the
actual directory. They look like separate mounts. There are two
entries in /proc/mounts and in /etc/mtab, one with the actual directory
path, one with the symlink path. I am using autofs to mount the
directories, not hardcoded. Are you using newer distributions?

What problems will I cause by doing this? I am using the symlink path
as the installation path for an application. The idea is a newer
version can be installed into a different directory, then after testing
the symlink will be changed to the new installation. Other applications
that reference the application will always use the symlink path, as well
as any user scripts.

Wayne

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Sev Binello
> Sent: Monday, November 10, 2008 11:06 AM
> To: J. Bruce Fields; [email protected]
> Subject: Re: [NFS] export dir thru 2 diff path names
>
> J. Bruce Fields wrote:
> > On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
> >
> >> Well the simplest approach doesn't work.
> >> i.e put symb link and actual path in the export file & try
> exporting
> >> it Exportfs dereferences the link and states that
> duplicates are not allowed.
> >>
> >
> > OK, makes sense.
> >
> > You could mount --bind the filesystem at the other location
> instead of
> > symlinking.
> >
> > The filehandles given to the client will be the same across the two
> > exports. If you mount both from the same client, behavior may vary
> > across different clients (for example, as to whether they
> attempt to
> > share caches between the two), but I think it'd work.
> >
> > (The question "why??!!??" does come to mind, though.)
> >
> >
> Need to make a path change to how file systems are mounted
> and exported on the servers This then required a wholesale
> change to clients so they mount the correct path.
> Not an issue for linux.
> But since we don't administer windows pcs and they also mount
> the same file system, wanted to see if we could let them stay
> the way they were for now.
>
> We're just going to go ahead and have to coordinate this
> with windows guys.
>
> -Sev
> > --b.
> >
> >
> >> -Sev
> >>
> >> J. Bruce Fields wrote:
> >>
> >>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
> >>>
> >>>
> >>>> Can anyone tell me if it's ok to export the same file system
> >>>> through 2 different paths ( one is a link) ?
> >>>>
> >>>>
> >>> I actually don't know. You could try it and tell us what
> you find
> >>> out....
> >>>
> >>> If you're exporting something *containing* the symlink
> and expecting
> >>> the client to traverse into the filesystem, be aware that
> symlinks
> >>> over NFS are actually interpreted (and followed) on the
> client--so
> >>> they're interpreted as *client-side* paths, not server-side.
> >>>
> >>> If the path you're exporting is itself a symlink--it probably
> >>> depends on how nfs-utils treats symlinks found in
> /etc/exports. I'd
> >>> have to try it or check the code.
> >>>
> >>> Another way to export the filesystem in two different
> places would
> >>> be with mount --bind.
> >>>
> >>> --b.
> >>>
> >>>
> >> --
> >>
> >> Sev Binello
> >> Brookhaven National Laboratory
> >> Upton, New York
> >> 631-344-5647
> >> [email protected]
> >>
> >>
>
>
> --------------------------------------------------------------
> -----------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge Build the coolest Linux based
> applications with Moblin SDK & win great prizes Grand prize
> is a trip for two to an Open Source event anywhere in the
> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> NFS maillist - [email protected]
> https://lists.sourceforge.net/lists/listinfo/nfs
> _______________________________________________
> Please note that [email protected] is being discontinued.
> Please subscribe to [email protected] instead.
> http://vger.kernel.org/vger-lists.html#linux-nfs
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-nfs" in the body of a message to
> [email protected] More majordomo info at
> http://vger.kernel.org/majordomo-info.html
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 18:52:07

by Sev Binello

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

Murata, Dennis wrote:
> I just tested this on a SL4.7 (RHEL 4.7 variant) using a RHEL 4.4 nfs
> server. I did get the messages from exportfs about duplicate export
> entries. On the client I was able to mount both the symlink and the
> actual directory. They look like separate mounts. There are two
> entries in /proc/mounts and in /etc/mtab, one with the actual directory
> path, one with the symlink path. I am using autofs to mount the
> directories, not hardcoded. Are you using newer distributions?
>
I tested on RHEL 4.6.
Interesting that you can still mount either one.
On the server an exportfs only shows the real path as exported.

> What problems will I cause by doing this? I am using the symlink path
> as the installation path for an application. The idea is a newer
> version can be installed into a different directory, then after testing
> the symlink will be changed to the new installation. Other applications
> that reference the application will always use the symlink path, as well
> as any user scripts.
>
> Wayne
>
>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Sev Binello
>> Sent: Monday, November 10, 2008 11:06 AM
>> To: J. Bruce Fields; [email protected]
>> Subject: Re: [NFS] export dir thru 2 diff path names
>>
>> J. Bruce Fields wrote:
>>
>>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
>>>
>>>
>>>> Well the simplest approach doesn't work.
>>>> i.e put symb link and actual path in the export file & try
>>>>
>> exporting
>>
>>>> it Exportfs dereferences the link and states that
>>>>
>> duplicates are not allowed.
>>
>>>>
>>>>
>>> OK, makes sense.
>>>
>>> You could mount --bind the filesystem at the other location
>>>
>> instead of
>>
>>> symlinking.
>>>
>>> The filehandles given to the client will be the same across the two
>>> exports. If you mount both from the same client, behavior may vary
>>> across different clients (for example, as to whether they
>>>
>> attempt to
>>
>>> share caches between the two), but I think it'd work.
>>>
>>> (The question "why??!!??" does come to mind, though.)
>>>
>>>
>>>
>> Need to make a path change to how file systems are mounted
>> and exported on the servers This then required a wholesale
>> change to clients so they mount the correct path.
>> Not an issue for linux.
>> But since we don't administer windows pcs and they also mount
>> the same file system, wanted to see if we could let them stay
>> the way they were for now.
>>
>> We're just going to go ahead and have to coordinate this
>> with windows guys.
>>
>> -Sev
>>
>>> --b.
>>>
>>>
>>>
>>>> -Sev
>>>>
>>>> J. Bruce Fields wrote:
>>>>
>>>>
>>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Can anyone tell me if it's ok to export the same file system
>>>>>> through 2 different paths ( one is a link) ?
>>>>>>
>>>>>>
>>>>>>
>>>>> I actually don't know. You could try it and tell us what
>>>>>
>> you find
>>
>>>>> out....
>>>>>
>>>>> If you're exporting something *containing* the symlink
>>>>>
>> and expecting
>>
>>>>> the client to traverse into the filesystem, be aware that
>>>>>
>> symlinks
>>
>>>>> over NFS are actually interpreted (and followed) on the
>>>>>
>> client--so
>>
>>>>> they're interpreted as *client-side* paths, not server-side.
>>>>>
>>>>> If the path you're exporting is itself a symlink--it probably
>>>>> depends on how nfs-utils treats symlinks found in
>>>>>
>> /etc/exports. I'd
>>
>>>>> have to try it or check the code.
>>>>>
>>>>> Another way to export the filesystem in two different
>>>>>
>> places would
>>
>>>>> be with mount --bind.
>>>>>
>>>>> --b.
>>>>>
>>>>>
>>>>>
>>>> --
>>>>
>>>> Sev Binello
>>>> Brookhaven National Laboratory
>>>> Upton, New York
>>>> 631-344-5647
>>>> [email protected]
>>>>
>>>>
>>>>
>> --------------------------------------------------------------
>> -----------
>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge Build the coolest Linux based
>> applications with Moblin SDK & win great prizes Grand prize
>> is a trip for two to an Open Source event anywhere in the
>> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> NFS maillist - [email protected]
>> https://lists.sourceforge.net/lists/listinfo/nfs
>> _______________________________________________
>> Please note that [email protected] is being discontinued.
>> Please subscribe to [email protected] instead.
>> http://vger.kernel.org/vger-lists.html#linux-nfs
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-nfs" in the body of a message to
>> [email protected] More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>>
>>


--

Sev Binello
Brookhaven National Laboratory
Upton, New York
631-344-5647
[email protected]


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 18:56:27

by Murata, Dennis

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

That is correct, exportfs only shows the actual directory. The client
seems to be able to mount the directory with either.

Wayne

> -----Original Message-----
> From: Sev Binello [mailto:[email protected]]
> Sent: Monday, November 10, 2008 12:51 PM
> To: Murata, Dennis
> Cc: J. Bruce Fields; [email protected]
> Subject: Re: [NFS] export dir thru 2 diff path names
>
> Murata, Dennis wrote:
> > I just tested this on a SL4.7 (RHEL 4.7 variant) using a
> RHEL 4.4 nfs
> > server. I did get the messages from exportfs about
> duplicate export
> > entries. On the client I was able to mount both the
> symlink and the
> > actual directory. They look like separate mounts. There are two
> > entries in /proc/mounts and in /etc/mtab, one with the actual
> > directory path, one with the symlink path. I am using
> autofs to mount
> > the directories, not hardcoded. Are you using newer distributions?
> >
> I tested on RHEL 4.6.
> Interesting that you can still mount either one.
> On the server an exportfs only shows the real path as exported.
>
> > What problems will I cause by doing this? I am using the
> symlink path
> > as the installation path for an application. The idea is a newer
> > version can be installed into a different directory, then after
> > testing the symlink will be changed to the new installation. Other
> > applications that reference the application will always use the
> > symlink path, as well as any user scripts.
> >
> > Wayne
> >
> >
> >> -----Original Message-----
> >> From: [email protected]
> >> [mailto:[email protected]] On Behalf Of Sev Binello
> >> Sent: Monday, November 10, 2008 11:06 AM
> >> To: J. Bruce Fields; [email protected]
> >> Subject: Re: [NFS] export dir thru 2 diff path names
> >>
> >> J. Bruce Fields wrote:
> >>
> >>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
> >>>
> >>>
> >>>> Well the simplest approach doesn't work.
> >>>> i.e put symb link and actual path in the export file & try
> >>>>
> >> exporting
> >>
> >>>> it Exportfs dereferences the link and states that
> >>>>
> >> duplicates are not allowed.
> >>
> >>>>
> >>>>
> >>> OK, makes sense.
> >>>
> >>> You could mount --bind the filesystem at the other location
> >>>
> >> instead of
> >>
> >>> symlinking.
> >>>
> >>> The filehandles given to the client will be the same
> across the two
> >>> exports. If you mount both from the same client,
> behavior may vary
> >>> across different clients (for example, as to whether they
> >>>
> >> attempt to
> >>
> >>> share caches between the two), but I think it'd work.
> >>>
> >>> (The question "why??!!??" does come to mind, though.)
> >>>
> >>>
> >>>
> >> Need to make a path change to how file systems are mounted and
> >> exported on the servers This then required a wholesale change to
> >> clients so they mount the correct path.
> >> Not an issue for linux.
> >> But since we don't administer windows pcs and they also mount the
> >> same file system, wanted to see if we could let them stay the way
> >> they were for now.
> >>
> >> We're just going to go ahead and have to coordinate this with
> >> windows guys.
> >>
> >> -Sev
> >>
> >>> --b.
> >>>
> >>>
> >>>
> >>>> -Sev
> >>>>
> >>>> J. Bruce Fields wrote:
> >>>>
> >>>>
> >>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Can anyone tell me if it's ok to export the same file system
> >>>>>> through 2 different paths ( one is a link) ?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> I actually don't know. You could try it and tell us what
> >>>>>
> >> you find
> >>
> >>>>> out....
> >>>>>
> >>>>> If you're exporting something *containing* the symlink
> >>>>>
> >> and expecting
> >>
> >>>>> the client to traverse into the filesystem, be aware that
> >>>>>
> >> symlinks
> >>
> >>>>> over NFS are actually interpreted (and followed) on the
> >>>>>
> >> client--so
> >>
> >>>>> they're interpreted as *client-side* paths, not server-side.
> >>>>>
> >>>>> If the path you're exporting is itself a symlink--it probably
> >>>>> depends on how nfs-utils treats symlinks found in
> >>>>>
> >> /etc/exports. I'd
> >>
> >>>>> have to try it or check the code.
> >>>>>
> >>>>> Another way to export the filesystem in two different
> >>>>>
> >> places would
> >>
> >>>>> be with mount --bind.
> >>>>>
> >>>>> --b.
> >>>>>
> >>>>>
> >>>>>
> >>>> --
> >>>>
> >>>> Sev Binello
> >>>> Brookhaven National Laboratory
> >>>> Upton, New York
> >>>> 631-344-5647
> >>>> [email protected]
> >>>>
> >>>>
> >>>>
> >> --------------------------------------------------------------
> >> -----------
> >> This SF.Net email is sponsored by the Moblin Your Move Developer's
> >> challenge Build the coolest Linux based applications with
> Moblin SDK
> >> & win great prizes Grand prize is a trip for two to an Open Source
> >> event anywhere in the world
> >> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> >> _______________________________________________
> >> NFS maillist - [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/nfs
> >> _______________________________________________
> >> Please note that [email protected] is being discontinued.
> >> Please subscribe to [email protected] instead.
> >> http://vger.kernel.org/vger-lists.html#linux-nfs
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe
> linux-nfs"
> >> in the body of a message to [email protected] More
> majordomo
> >> info at http://vger.kernel.org/majordomo-info.html
> >>
> >>
>
>
> --
>
> Sev Binello
> Brookhaven National Laboratory
> Upton, New York
> 631-344-5647
> [email protected]
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 19:04:40

by Sev Binello

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

Hi -
Yeah, I see.
So it actually looks like you can do this.
I'm not 100% sure if safe --though it looks it -- so I'll probably
not use it for this application.

Thanks
-Sev

Murata, Dennis wrote:
> That is correct, exportfs only shows the actual directory. The client
> seems to be able to mount the directory with either.
>
> Wayne
>
>
>> -----Original Message-----
>> From: Sev Binello [mailto:[email protected]]
>> Sent: Monday, November 10, 2008 12:51 PM
>> To: Murata, Dennis
>> Cc: J. Bruce Fields; [email protected]
>> Subject: Re: [NFS] export dir thru 2 diff path names
>>
>> Murata, Dennis wrote:
>>
>>> I just tested this on a SL4.7 (RHEL 4.7 variant) using a
>>>
>> RHEL 4.4 nfs
>>
>>> server. I did get the messages from exportfs about
>>>
>> duplicate export
>>
>>> entries. On the client I was able to mount both the
>>>
>> symlink and the
>>
>>> actual directory. They look like separate mounts. There are two
>>> entries in /proc/mounts and in /etc/mtab, one with the actual
>>> directory path, one with the symlink path. I am using
>>>
>> autofs to mount
>>
>>> the directories, not hardcoded. Are you using newer distributions?
>>>
>>>
>> I tested on RHEL 4.6.
>> Interesting that you can still mount either one.
>> On the server an exportfs only shows the real path as exported.
>>
>>
>>> What problems will I cause by doing this? I am using the
>>>
>> symlink path
>>
>>> as the installation path for an application. The idea is a newer
>>> version can be installed into a different directory, then after
>>> testing the symlink will be changed to the new installation. Other
>>> applications that reference the application will always use the
>>> symlink path, as well as any user scripts.
>>>
>>> Wayne
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: [email protected]
>>>> [mailto:[email protected]] On Behalf Of Sev Binello
>>>> Sent: Monday, November 10, 2008 11:06 AM
>>>> To: J. Bruce Fields; [email protected]
>>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>>
>>>> J. Bruce Fields wrote:
>>>>
>>>>
>>>>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Well the simplest approach doesn't work.
>>>>>> i.e put symb link and actual path in the export file & try
>>>>>>
>>>>>>
>>>> exporting
>>>>
>>>>
>>>>>> it Exportfs dereferences the link and states that
>>>>>>
>>>>>>
>>>> duplicates are not allowed.
>>>>
>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> OK, makes sense.
>>>>>
>>>>> You could mount --bind the filesystem at the other location
>>>>>
>>>>>
>>>> instead of
>>>>
>>>>
>>>>> symlinking.
>>>>>
>>>>> The filehandles given to the client will be the same
>>>>>
>> across the two
>>
>>>>> exports. If you mount both from the same client,
>>>>>
>> behavior may vary
>>
>>>>> across different clients (for example, as to whether they
>>>>>
>>>>>
>>>> attempt to
>>>>
>>>>
>>>>> share caches between the two), but I think it'd work.
>>>>>
>>>>> (The question "why??!!??" does come to mind, though.)
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Need to make a path change to how file systems are mounted and
>>>> exported on the servers This then required a wholesale change to
>>>> clients so they mount the correct path.
>>>> Not an issue for linux.
>>>> But since we don't administer windows pcs and they also mount the
>>>> same file system, wanted to see if we could let them stay the way
>>>> they were for now.
>>>>
>>>> We're just going to go ahead and have to coordinate this with
>>>> windows guys.
>>>>
>>>> -Sev
>>>>
>>>>
>>>>> --b.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> -Sev
>>>>>>
>>>>>> J. Bruce Fields wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Can anyone tell me if it's ok to export the same file system
>>>>>>>> through 2 different paths ( one is a link) ?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> I actually don't know. You could try it and tell us what
>>>>>>>
>>>>>>>
>>>> you find
>>>>
>>>>
>>>>>>> out....
>>>>>>>
>>>>>>> If you're exporting something *containing* the symlink
>>>>>>>
>>>>>>>
>>>> and expecting
>>>>
>>>>
>>>>>>> the client to traverse into the filesystem, be aware that
>>>>>>>
>>>>>>>
>>>> symlinks
>>>>
>>>>
>>>>>>> over NFS are actually interpreted (and followed) on the
>>>>>>>
>>>>>>>
>>>> client--so
>>>>
>>>>
>>>>>>> they're interpreted as *client-side* paths, not server-side.
>>>>>>>
>>>>>>> If the path you're exporting is itself a symlink--it probably
>>>>>>> depends on how nfs-utils treats symlinks found in
>>>>>>>
>>>>>>>
>>>> /etc/exports. I'd
>>>>
>>>>
>>>>>>> have to try it or check the code.
>>>>>>>
>>>>>>> Another way to export the filesystem in two different
>>>>>>>
>>>>>>>
>>>> places would
>>>>
>>>>
>>>>>>> be with mount --bind.
>>>>>>>
>>>>>>> --b.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>>
>>>>>> Sev Binello
>>>>>> Brookhaven National Laboratory
>>>>>> Upton, New York
>>>>>> 631-344-5647
>>>>>> [email protected]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>> --------------------------------------------------------------
>>>> -----------
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>> challenge Build the coolest Linux based applications with
>>>>
>> Moblin SDK
>>
>>>> & win great prizes Grand prize is a trip for two to an Open Source
>>>> event anywhere in the world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>> _______________________________________________
>>>> NFS maillist - [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/nfs
>>>> _______________________________________________
>>>> Please note that [email protected] is being discontinued.
>>>> Please subscribe to [email protected] instead.
>>>> http://vger.kernel.org/vger-lists.html#linux-nfs
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>
>> linux-nfs"
>>
>>>> in the body of a message to [email protected] More
>>>>
>> majordomo
>>
>>>> info at http://vger.kernel.org/majordomo-info.html
>>>>
>>>>
>>>>
>> --
>>
>> Sev Binello
>> Brookhaven National Laboratory
>> Upton, New York
>> 631-344-5647
>> [email protected]
>>
>>
>>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 19:26:18

by Murata, Dennis

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

That really is the 64K question. During my initial testing, I exported
the parent directory. Now I am explicitly exporting the installation
directories, where I see the exportfs message. In the messages log file
on the server the mount request from the client is always the actual
directory.

Wayne

> -----Original Message-----
> From: Sev Binello [mailto:[email protected]]
> Sent: Monday, November 10, 2008 1:04 PM
> To: Murata, Dennis
> Cc: J. Bruce Fields; [email protected]
> Subject: Re: [NFS] export dir thru 2 diff path names
>
> Hi -
> Yeah, I see.
> So it actually looks like you can do this.
> I'm not 100% sure if safe --though it looks it -- so I'll
> probably not use it for this application.
>
> Thanks
> -Sev
>
> Murata, Dennis wrote:
> > That is correct, exportfs only shows the actual directory.
> The client
> > seems to be able to mount the directory with either.
> >
> > Wayne
> >
> >
> >> -----Original Message-----
> >> From: Sev Binello [mailto:[email protected]]
> >> Sent: Monday, November 10, 2008 12:51 PM
> >> To: Murata, Dennis
> >> Cc: J. Bruce Fields; [email protected]
> >> Subject: Re: [NFS] export dir thru 2 diff path names
> >>
> >> Murata, Dennis wrote:
> >>
> >>> I just tested this on a SL4.7 (RHEL 4.7 variant) using a
> >>>
> >> RHEL 4.4 nfs
> >>
> >>> server. I did get the messages from exportfs about
> >>>
> >> duplicate export
> >>
> >>> entries. On the client I was able to mount both the
> >>>
> >> symlink and the
> >>
> >>> actual directory. They look like separate mounts. There are two
> >>> entries in /proc/mounts and in /etc/mtab, one with the actual
> >>> directory path, one with the symlink path. I am using
> >>>
> >> autofs to mount
> >>
> >>> the directories, not hardcoded. Are you using newer
> distributions?
> >>>
> >>>
> >> I tested on RHEL 4.6.
> >> Interesting that you can still mount either one.
> >> On the server an exportfs only shows the real path as exported.
> >>
> >>
> >>> What problems will I cause by doing this? I am using the
> >>>
> >> symlink path
> >>
> >>> as the installation path for an application. The idea is a newer
> >>> version can be installed into a different directory, then after
> >>> testing the symlink will be changed to the new
> installation. Other
> >>> applications that reference the application will always use the
> >>> symlink path, as well as any user scripts.
> >>>
> >>> Wayne
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: [email protected]
> >>>> [mailto:[email protected]] On Behalf Of Sev Binello
> >>>> Sent: Monday, November 10, 2008 11:06 AM
> >>>> To: J. Bruce Fields; [email protected]
> >>>> Subject: Re: [NFS] export dir thru 2 diff path names
> >>>>
> >>>> J. Bruce Fields wrote:
> >>>>
> >>>>
> >>>>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Well the simplest approach doesn't work.
> >>>>>> i.e put symb link and actual path in the export file & try
> >>>>>>
> >>>>>>
> >>>> exporting
> >>>>
> >>>>
> >>>>>> it Exportfs dereferences the link and states that
> >>>>>>
> >>>>>>
> >>>> duplicates are not allowed.
> >>>>
> >>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> OK, makes sense.
> >>>>>
> >>>>> You could mount --bind the filesystem at the other location
> >>>>>
> >>>>>
> >>>> instead of
> >>>>
> >>>>
> >>>>> symlinking.
> >>>>>
> >>>>> The filehandles given to the client will be the same
> >>>>>
> >> across the two
> >>
> >>>>> exports. If you mount both from the same client,
> >>>>>
> >> behavior may vary
> >>
> >>>>> across different clients (for example, as to whether they
> >>>>>
> >>>>>
> >>>> attempt to
> >>>>
> >>>>
> >>>>> share caches between the two), but I think it'd work.
> >>>>>
> >>>>> (The question "why??!!??" does come to mind, though.)
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>> Need to make a path change to how file systems are mounted and
> >>>> exported on the servers This then required a wholesale change to
> >>>> clients so they mount the correct path.
> >>>> Not an issue for linux.
> >>>> But since we don't administer windows pcs and they also
> mount the
> >>>> same file system, wanted to see if we could let them
> stay the way
> >>>> they were for now.
> >>>>
> >>>> We're just going to go ahead and have to coordinate this with
> >>>> windows guys.
> >>>>
> >>>> -Sev
> >>>>
> >>>>
> >>>>> --b.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> -Sev
> >>>>>>
> >>>>>> J. Bruce Fields wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>> Can anyone tell me if it's ok to export the same file system
> >>>>>>>> through 2 different paths ( one is a link) ?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> I actually don't know. You could try it and tell us what
> >>>>>>>
> >>>>>>>
> >>>> you find
> >>>>
> >>>>
> >>>>>>> out....
> >>>>>>>
> >>>>>>> If you're exporting something *containing* the symlink
> >>>>>>>
> >>>>>>>
> >>>> and expecting
> >>>>
> >>>>
> >>>>>>> the client to traverse into the filesystem, be aware that
> >>>>>>>
> >>>>>>>
> >>>> symlinks
> >>>>
> >>>>
> >>>>>>> over NFS are actually interpreted (and followed) on the
> >>>>>>>
> >>>>>>>
> >>>> client--so
> >>>>
> >>>>
> >>>>>>> they're interpreted as *client-side* paths, not server-side.
> >>>>>>>
> >>>>>>> If the path you're exporting is itself a symlink--it probably
> >>>>>>> depends on how nfs-utils treats symlinks found in
> >>>>>>>
> >>>>>>>
> >>>> /etc/exports. I'd
> >>>>
> >>>>
> >>>>>>> have to try it or check the code.
> >>>>>>>
> >>>>>>> Another way to export the filesystem in two different
> >>>>>>>
> >>>>>>>
> >>>> places would
> >>>>
> >>>>
> >>>>>>> be with mount --bind.
> >>>>>>>
> >>>>>>> --b.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> --
> >>>>>>
> >>>>>> Sev Binello
> >>>>>> Brookhaven National Laboratory
> >>>>>> Upton, New York
> >>>>>> 631-344-5647
> >>>>>> [email protected]
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>> --------------------------------------------------------------
> >>>> -----------
> >>>> This SF.Net email is sponsored by the Moblin Your Move
> Developer's
> >>>> challenge Build the coolest Linux based applications with
> >>>>
> >> Moblin SDK
> >>
> >>>> & win great prizes Grand prize is a trip for two to an
> Open Source
> >>>> event anywhere in the world
> >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> >>>> _______________________________________________
> >>>> NFS maillist - [email protected]
> >>>> https://lists.sourceforge.net/lists/listinfo/nfs
> >>>> _______________________________________________
> >>>> Please note that [email protected] is being discontinued.
> >>>> Please subscribe to [email protected] instead.
> >>>> http://vger.kernel.org/vger-lists.html#linux-nfs
> >>>>
> >>>> --
> >>>> To unsubscribe from this list: send the line "unsubscribe
> >>>>
> >> linux-nfs"
> >>
> >>>> in the body of a message to [email protected] More
> >>>>
> >> majordomo
> >>
> >>>> info at http://vger.kernel.org/majordomo-info.html
> >>>>
> >>>>
> >>>>
> >> --
> >>
> >> Sev Binello
> >> Brookhaven National Laboratory
> >> Upton, New York
> >> 631-344-5647
> >> [email protected]
> >>
> >>
> >>
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 19:29:19

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Mon, Nov 10, 2008 at 11:28:04AM -0800, Murata, Dennis wrote:
> That really is the 64K question. During my initial testing, I exported
> the parent directory. Now I am explicitly exporting the installation
> directories, where I see the exportfs message. In the messages log file
> on the server the mount request from the client is always the actual
> directory.

I don't see how this would be "unsafe"--if it works, go for it.

One potential trap: it's using the same client list and export options
for both, so if you think you can make one of them read-only and one of
them writeable, for example, you'll be disapointed.

--b.

>
> Wayne
>
> > -----Original Message-----
> > From: Sev Binello [mailto:[email protected]]
> > Sent: Monday, November 10, 2008 1:04 PM
> > To: Murata, Dennis
> > Cc: J. Bruce Fields; [email protected]
> > Subject: Re: [NFS] export dir thru 2 diff path names
> >
> > Hi -
> > Yeah, I see.
> > So it actually looks like you can do this.
> > I'm not 100% sure if safe --though it looks it -- so I'll
> > probably not use it for this application.
> >
> > Thanks
> > -Sev
> >
> > Murata, Dennis wrote:
> > > That is correct, exportfs only shows the actual directory.
> > The client
> > > seems to be able to mount the directory with either.
> > >
> > > Wayne
> > >
> > >
> > >> -----Original Message-----
> > >> From: Sev Binello [mailto:[email protected]]
> > >> Sent: Monday, November 10, 2008 12:51 PM
> > >> To: Murata, Dennis
> > >> Cc: J. Bruce Fields; [email protected]
> > >> Subject: Re: [NFS] export dir thru 2 diff path names
> > >>
> > >> Murata, Dennis wrote:
> > >>
> > >>> I just tested this on a SL4.7 (RHEL 4.7 variant) using a
> > >>>
> > >> RHEL 4.4 nfs
> > >>
> > >>> server. I did get the messages from exportfs about
> > >>>
> > >> duplicate export
> > >>
> > >>> entries. On the client I was able to mount both the
> > >>>
> > >> symlink and the
> > >>
> > >>> actual directory. They look like separate mounts. There are two
> > >>> entries in /proc/mounts and in /etc/mtab, one with the actual
> > >>> directory path, one with the symlink path. I am using
> > >>>
> > >> autofs to mount
> > >>
> > >>> the directories, not hardcoded. Are you using newer
> > distributions?
> > >>>
> > >>>
> > >> I tested on RHEL 4.6.
> > >> Interesting that you can still mount either one.
> > >> On the server an exportfs only shows the real path as exported.
> > >>
> > >>
> > >>> What problems will I cause by doing this? I am using the
> > >>>
> > >> symlink path
> > >>
> > >>> as the installation path for an application. The idea is a newer
> > >>> version can be installed into a different directory, then after
> > >>> testing the symlink will be changed to the new
> > installation. Other
> > >>> applications that reference the application will always use the
> > >>> symlink path, as well as any user scripts.
> > >>>
> > >>> Wayne
> > >>>
> > >>>
> > >>>
> > >>>> -----Original Message-----
> > >>>> From: [email protected]
> > >>>> [mailto:[email protected]] On Behalf Of Sev Binello
> > >>>> Sent: Monday, November 10, 2008 11:06 AM
> > >>>> To: J. Bruce Fields; [email protected]
> > >>>> Subject: Re: [NFS] export dir thru 2 diff path names
> > >>>>
> > >>>> J. Bruce Fields wrote:
> > >>>>
> > >>>>
> > >>>>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>> Well the simplest approach doesn't work.
> > >>>>>> i.e put symb link and actual path in the export file & try
> > >>>>>>
> > >>>>>>
> > >>>> exporting
> > >>>>
> > >>>>
> > >>>>>> it Exportfs dereferences the link and states that
> > >>>>>>
> > >>>>>>
> > >>>> duplicates are not allowed.
> > >>>>
> > >>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>> OK, makes sense.
> > >>>>>
> > >>>>> You could mount --bind the filesystem at the other location
> > >>>>>
> > >>>>>
> > >>>> instead of
> > >>>>
> > >>>>
> > >>>>> symlinking.
> > >>>>>
> > >>>>> The filehandles given to the client will be the same
> > >>>>>
> > >> across the two
> > >>
> > >>>>> exports. If you mount both from the same client,
> > >>>>>
> > >> behavior may vary
> > >>
> > >>>>> across different clients (for example, as to whether they
> > >>>>>
> > >>>>>
> > >>>> attempt to
> > >>>>
> > >>>>
> > >>>>> share caches between the two), but I think it'd work.
> > >>>>>
> > >>>>> (The question "why??!!??" does come to mind, though.)
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>> Need to make a path change to how file systems are mounted and
> > >>>> exported on the servers This then required a wholesale change to
> > >>>> clients so they mount the correct path.
> > >>>> Not an issue for linux.
> > >>>> But since we don't administer windows pcs and they also
> > mount the
> > >>>> same file system, wanted to see if we could let them
> > stay the way
> > >>>> they were for now.
> > >>>>
> > >>>> We're just going to go ahead and have to coordinate this with
> > >>>> windows guys.
> > >>>>
> > >>>> -Sev
> > >>>>
> > >>>>
> > >>>>> --b.
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>> -Sev
> > >>>>>>
> > >>>>>> J. Bruce Fields wrote:
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>> Can anyone tell me if it's ok to export the same file system
> > >>>>>>>> through 2 different paths ( one is a link) ?
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>> I actually don't know. You could try it and tell us what
> > >>>>>>>
> > >>>>>>>
> > >>>> you find
> > >>>>
> > >>>>
> > >>>>>>> out....
> > >>>>>>>
> > >>>>>>> If you're exporting something *containing* the symlink
> > >>>>>>>
> > >>>>>>>
> > >>>> and expecting
> > >>>>
> > >>>>
> > >>>>>>> the client to traverse into the filesystem, be aware that
> > >>>>>>>
> > >>>>>>>
> > >>>> symlinks
> > >>>>
> > >>>>
> > >>>>>>> over NFS are actually interpreted (and followed) on the
> > >>>>>>>
> > >>>>>>>
> > >>>> client--so
> > >>>>
> > >>>>
> > >>>>>>> they're interpreted as *client-side* paths, not server-side.
> > >>>>>>>
> > >>>>>>> If the path you're exporting is itself a symlink--it probably
> > >>>>>>> depends on how nfs-utils treats symlinks found in
> > >>>>>>>
> > >>>>>>>
> > >>>> /etc/exports. I'd
> > >>>>
> > >>>>
> > >>>>>>> have to try it or check the code.
> > >>>>>>>
> > >>>>>>> Another way to export the filesystem in two different
> > >>>>>>>
> > >>>>>>>
> > >>>> places would
> > >>>>
> > >>>>
> > >>>>>>> be with mount --bind.
> > >>>>>>>
> > >>>>>>> --b.
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>> --
> > >>>>>>
> > >>>>>> Sev Binello
> > >>>>>> Brookhaven National Laboratory
> > >>>>>> Upton, New York
> > >>>>>> 631-344-5647
> > >>>>>> [email protected]
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>> --------------------------------------------------------------
> > >>>> -----------
> > >>>> This SF.Net email is sponsored by the Moblin Your Move
> > Developer's
> > >>>> challenge Build the coolest Linux based applications with
> > >>>>
> > >> Moblin SDK
> > >>
> > >>>> & win great prizes Grand prize is a trip for two to an
> > Open Source
> > >>>> event anywhere in the world
> > >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > >>>> _______________________________________________
> > >>>> NFS maillist - [email protected]
> > >>>> https://lists.sourceforge.net/lists/listinfo/nfs
> > >>>> _______________________________________________
> > >>>> Please note that [email protected] is being discontinued.
> > >>>> Please subscribe to [email protected] instead.
> > >>>> http://vger.kernel.org/vger-lists.html#linux-nfs
> > >>>>
> > >>>> --
> > >>>> To unsubscribe from this list: send the line "unsubscribe
> > >>>>
> > >> linux-nfs"
> > >>
> > >>>> in the body of a message to [email protected] More
> > >>>>
> > >> majordomo
> > >>
> > >>>> info at http://vger.kernel.org/majordomo-info.html
> > >>>>
> > >>>>
> > >>>>
> > >> --
> > >>
> > >> Sev Binello
> > >> Brookhaven National Laboratory
> > >> Upton, New York
> > >> 631-344-5647
> > >> [email protected]
> > >>
> > >>
> > >>
> >
> >

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-11-10 19:38:01

by Sev Binello

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

Since on the server side there truly is only 1 export.
And clients just access the same export through 2 different names,
I expect it would be safe.

-Sev

ps: But I think I'll wait for a simpler application (less negative
ramifications) to test it
BTW haven't seen this documented anywhere.

J. Bruce Fields wrote:
> On Mon, Nov 10, 2008 at 11:28:04AM -0800, Murata, Dennis wrote:
>
>> That really is the 64K question. During my initial testing, I exported
>> the parent directory. Now I am explicitly exporting the installation
>> directories, where I see the exportfs message. In the messages log file
>> on the server the mount request from the client is always the actual
>> directory.
>>
>
> I don't see how this would be "unsafe"--if it works, go for it.
>
> One potential trap: it's using the same client list and export options
> for both, so if you think you can make one of them read-only and one of
> them writeable, for example, you'll be disapointed.
>
> --b.
>
>
>> Wayne
>>
>>
>>> -----Original Message-----
>>> From: Sev Binello [mailto:[email protected]]
>>> Sent: Monday, November 10, 2008 1:04 PM
>>> To: Murata, Dennis
>>> Cc: J. Bruce Fields; [email protected]
>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>
>>> Hi -
>>> Yeah, I see.
>>> So it actually looks like you can do this.
>>> I'm not 100% sure if safe --though it looks it -- so I'll
>>> probably not use it for this application.
>>>
>>> Thanks
>>> -Sev
>>>
>>> Murata, Dennis wrote:
>>>
>>>> That is correct, exportfs only shows the actual directory.
>>>>
>>> The client
>>>
>>>> seems to be able to mount the directory with either.
>>>>
>>>> Wayne
>>>>
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: Sev Binello [mailto:[email protected]]
>>>>> Sent: Monday, November 10, 2008 12:51 PM
>>>>> To: Murata, Dennis
>>>>> Cc: J. Bruce Fields; [email protected]
>>>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>>>
>>>>> Murata, Dennis wrote:
>>>>>
>>>>>
>>>>>> I just tested this on a SL4.7 (RHEL 4.7 variant) using a
>>>>>>
>>>>>>
>>>>> RHEL 4.4 nfs
>>>>>
>>>>>
>>>>>> server. I did get the messages from exportfs about
>>>>>>
>>>>>>
>>>>> duplicate export
>>>>>
>>>>>
>>>>>> entries. On the client I was able to mount both the
>>>>>>
>>>>>>
>>>>> symlink and the
>>>>>
>>>>>
>>>>>> actual directory. They look like separate mounts. There are two
>>>>>> entries in /proc/mounts and in /etc/mtab, one with the actual
>>>>>> directory path, one with the symlink path. I am using
>>>>>>
>>>>>>
>>>>> autofs to mount
>>>>>
>>>>>
>>>>>> the directories, not hardcoded. Are you using newer
>>>>>>
>>> distributions?
>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> I tested on RHEL 4.6.
>>>>> Interesting that you can still mount either one.
>>>>> On the server an exportfs only shows the real path as exported.
>>>>>
>>>>>
>>>>>
>>>>>> What problems will I cause by doing this? I am using the
>>>>>>
>>>>>>
>>>>> symlink path
>>>>>
>>>>>
>>>>>> as the installation path for an application. The idea is a newer
>>>>>> version can be installed into a different directory, then after
>>>>>> testing the symlink will be changed to the new
>>>>>>
>>> installation. Other
>>>
>>>>>> applications that reference the application will always use the
>>>>>> symlink path, as well as any user scripts.
>>>>>>
>>>>>> Wayne
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: [email protected]
>>>>>>> [mailto:[email protected]] On Behalf Of Sev Binello
>>>>>>> Sent: Monday, November 10, 2008 11:06 AM
>>>>>>> To: J. Bruce Fields; [email protected]
>>>>>>> Subject: Re: [NFS] export dir thru 2 diff path names
>>>>>>>
>>>>>>> J. Bruce Fields wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> On Mon, Nov 10, 2008 at 10:55:48AM -0500, Sev Binello wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Well the simplest approach doesn't work.
>>>>>>>>> i.e put symb link and actual path in the export file & try
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> exporting
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>> it Exportfs dereferences the link and states that
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> duplicates are not allowed.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> OK, makes sense.
>>>>>>>>
>>>>>>>> You could mount --bind the filesystem at the other location
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> instead of
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> symlinking.
>>>>>>>>
>>>>>>>> The filehandles given to the client will be the same
>>>>>>>>
>>>>>>>>
>>>>> across the two
>>>>>
>>>>>
>>>>>>>> exports. If you mount both from the same client,
>>>>>>>>
>>>>>>>>
>>>>> behavior may vary
>>>>>
>>>>>
>>>>>>>> across different clients (for example, as to whether they
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> attempt to
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> share caches between the two), but I think it'd work.
>>>>>>>>
>>>>>>>> (The question "why??!!??" does come to mind, though.)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> Need to make a path change to how file systems are mounted and
>>>>>>> exported on the servers This then required a wholesale change to
>>>>>>> clients so they mount the correct path.
>>>>>>> Not an issue for linux.
>>>>>>> But since we don't administer windows pcs and they also
>>>>>>>
>>> mount the
>>>
>>>>>>> same file system, wanted to see if we could let them
>>>>>>>
>>> stay the way
>>>
>>>>>>> they were for now.
>>>>>>>
>>>>>>> We're just going to go ahead and have to coordinate this with
>>>>>>> windows guys.
>>>>>>>
>>>>>>> -Sev
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> --b.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> -Sev
>>>>>>>>>
>>>>>>>>> J. Bruce Fields wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> On Fri, Nov 07, 2008 at 12:44:25PM -0500, Sev Binello wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Can anyone tell me if it's ok to export the same file system
>>>>>>>>>>> through 2 different paths ( one is a link) ?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>> I actually don't know. You could try it and tell us what
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> you find
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>> out....
>>>>>>>>>>
>>>>>>>>>> If you're exporting something *containing* the symlink
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> and expecting
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>> the client to traverse into the filesystem, be aware that
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> symlinks
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>> over NFS are actually interpreted (and followed) on the
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> client--so
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>> they're interpreted as *client-side* paths, not server-side.
>>>>>>>>>>
>>>>>>>>>> If the path you're exporting is itself a symlink--it probably
>>>>>>>>>> depends on how nfs-utils treats symlinks found in
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> /etc/exports. I'd
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>> have to try it or check the code.
>>>>>>>>>>
>>>>>>>>>> Another way to export the filesystem in two different
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>> places would
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>> be with mount --bind.
>>>>>>>>>>
>>>>>>>>>> --b.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Sev Binello
>>>>>>>>> Brookhaven National Laboratory
>>>>>>>>> Upton, New York
>>>>>>>>> 631-344-5647
>>>>>>>>> [email protected]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> --------------------------------------------------------------
>>>>>>> -----------
>>>>>>> This SF.Net email is sponsored by the Moblin Your Move
>>>>>>>
>>> Developer's
>>>
>>>>>>> challenge Build the coolest Linux based applications with
>>>>>>>
>>>>>>>
>>>>> Moblin SDK
>>>>>
>>>>>
>>>>>>> & win great prizes Grand prize is a trip for two to an
>>>>>>>
>>> Open Source
>>>
>>>>>>> event anywhere in the world
>>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>>>> _______________________________________________
>>>>>>> NFS maillist - [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/nfs
>>>>>>> _______________________________________________
>>>>>>> Please note that [email protected] is being discontinued.
>>>>>>> Please subscribe to [email protected] instead.
>>>>>>> http://vger.kernel.org/vger-lists.html#linux-nfs
>>>>>>>
>>>>>>> --
>>>>>>> To unsubscribe from this list: send the line "unsubscribe
>>>>>>>
>>>>>>>
>>>>> linux-nfs"
>>>>>
>>>>>
>>>>>>> in the body of a message to [email protected] More
>>>>>>>
>>>>>>>
>>>>> majordomo
>>>>>
>>>>>
>>>>>>> info at http://vger.kernel.org/majordomo-info.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>> --
>>>>>
>>>>> Sev Binello
>>>>> Brookhaven National Laboratory
>>>>> Upton, New York
>>>>> 631-344-5647
>>>>> [email protected]
>>>>>
>>>>>
>>>>>
>>>>>
>>>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs


2008-12-03 21:47:10

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [NFS] export dir thru 2 diff path names

On Wed, Nov 12, 2008 at 10:04:30AM -0800, Murata, Dennis wrote:
> One last question for the maintainers and the community. Is this viewed
> as an undocumented feature or a bug to be fixed? I would hate to
> recommend use of the exported link, only to have it disabled by an
> updated patch.

Hopefully if it turns out there's some good reason why we'd need to
disable it, then we can provide some sort of backwards-compatibility
flag (or at least a warning).

--b.

>
> Wayne
>
> > -----Original Message-----
> > From: J. Bruce Fields [mailto:[email protected]]
> > Sent: Monday, November 10, 2008 2:45 PM
> > To: Chuck Lever
> > Cc: Murata, Dennis; [email protected]; Sev Binello
> > Subject: Re: [NFS] export dir thru 2 diff path names
> >
> > On Mon, Nov 10, 2008 at 03:20:42PM -0500, Chuck Lever wrote:
> > > On Nov 10, 2008, at Nov 10, 2008, 2:28 PM, J. Bruce Fields wrote:
> > >> On Mon, Nov 10, 2008 at 11:28:04AM -0800, Murata, Dennis wrote:
> > >>> That really is the 64K question. During my initial testing, I
> > >>> exported the parent directory. Now I am explicitly exporting the
> > >>> installation directories, where I see the exportfs
> > message. In the
> > >>> messages log file on the server the mount request from
> > the client is
> > >>> always the actual directory.
> > >>
> > >> I don't see how this would be "unsafe"--if it works, go for it.
> > >>
> > >> One potential trap: it's using the same client list and export
> > >> options for both, so if you think you can make one of them
> > read-only
> > >> and one of them writeable, for example, you'll be disapointed.
> > >
> > > I wonder how this behaves on the client side. If the same client
> > > mounts both paths, will it recognize that these are the
> > same and use a
> > > shared page cache for both?
> >
> > Yeah, who knows. I suspect it assumes they're different if
> > the mount paths are different.
> >
> > But for most people's purposes it probably doesn't matter
> > much. (For the purposes people have mentioned so far they
> > don't even need to mount both paths from the same client at once.)
> >
> > --b.
> >

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that [email protected] is being discontinued.
Please subscribe to [email protected] instead.
http://vger.kernel.org/vger-lists.html#linux-nfs