linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NFSv4 fsid=0 export still necessary?
@ 2011-12-03 11:21 Harald Dunkel
  2011-12-03 13:56 ` Jim Rees
  2011-12-03 16:51 ` Steve Dickson
  0 siblings, 2 replies; 7+ messages in thread
From: Harald Dunkel @ 2011-12-03 11:21 UTC (permalink / raw)
  To: linux-nfs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi folks,

several NFSv4-HOWTOs in the net require to export a root directory
with fsid=0 first. Other exported directory trees should be nested
within this root directory and exported with nohide. AFAIU the advan-
tage of the root dir is that the client can mount "server:/somedir"
instead of "server:/remote_mount_point/somedir".

Question: Is the common root directory optional? Since NFSv3 doesn't
support this name space feature, wouldn't it be more wise to omit
the root directory?


Any helpful comment would be highly appreciated

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk7aBlAACgkQUTlbRTxpHjeO0wCggdEdfcBzswibHAOG6w2xJa5r
B4QAn3MsYZR7xCh60c1X4AsNLnutXSPI
=nEBr
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFSv4 fsid=0 export still necessary?
  2011-12-03 11:21 NFSv4 fsid=0 export still necessary? Harald Dunkel
@ 2011-12-03 13:56 ` Jim Rees
  2011-12-03 16:51 ` Steve Dickson
  1 sibling, 0 replies; 7+ messages in thread
From: Jim Rees @ 2011-12-03 13:56 UTC (permalink / raw)
  To: Harald Dunkel; +Cc: linux-nfs

Harald Dunkel wrote:

  Question: Is the common root directory optional? Since NFSv3 doesn't
  support this name space feature, wouldn't it be more wise to omit
  the root directory?

The server root directory combined with SRV records to locate server roots
would give us a universal name space, something I've been advocating for
since the beginning of v4.  But today our universal names all seem to start
with "http:".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFSv4 fsid=0 export still necessary?
  2011-12-03 11:21 NFSv4 fsid=0 export still necessary? Harald Dunkel
  2011-12-03 13:56 ` Jim Rees
@ 2011-12-03 16:51 ` Steve Dickson
  2011-12-06  1:10   ` J. Bruce Fields
  1 sibling, 1 reply; 7+ messages in thread
From: Steve Dickson @ 2011-12-03 16:51 UTC (permalink / raw)
  To: Harald Dunkel; +Cc: linux-nfs



On 12/03/2011 06:21 AM, Harald Dunkel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi folks,
> 
> several NFSv4-HOWTOs in the net require to export a root directory
> with fsid=0 first. Other exported directory trees should be nested
> within this root directory and exported with nohide. AFAIU the advan-
> tage of the root dir is that the client can mount "server:/somedir"
> instead of "server:/remote_mount_point/somedir".
> 
> Question: Is the common root directory optional? Since NFSv3 doesn't
> support this name space feature, wouldn't it be more wise to omit
> the root directory?
No, the fsid=0 export option is no longer necessary to make v4
exports compatible with v2/v3 exports. When the fsid option
is not set, the default root is define as "/" which allows
the v4 clients to mount the same exports as does the v2/v3 clients.

Now if you do not what "/" as your default root, you can
set fsid to something like fsid=/export. This will
change to default root to the /export directory which
means your v4 clients will only be able to access exports
under the /export directory. 

I believe the Linux server is the only server to have
this option...

steved.

> 
> 
> Any helpful comment would be highly appreciated
> 
> Harri
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> 
> iEYEARECAAYFAk7aBlAACgkQUTlbRTxpHjeO0wCggdEdfcBzswibHAOG6w2xJa5r
> B4QAn3MsYZR7xCh60c1X4AsNLnutXSPI
> =nEBr
> -----END PGP SIGNATURE-----
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFSv4 fsid=0 export still necessary?
  2011-12-03 16:51 ` Steve Dickson
@ 2011-12-06  1:10   ` J. Bruce Fields
  2011-12-07 16:30     ` Steve Dickson
  0 siblings, 1 reply; 7+ messages in thread
From: J. Bruce Fields @ 2011-12-06  1:10 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Harald Dunkel, linux-nfs

On Sat, Dec 03, 2011 at 11:51:19AM -0500, Steve Dickson wrote:
> No, the fsid=0 export option is no longer necessary to make v4
> exports compatible with v2/v3 exports. When the fsid option
> is not set, the default root is define as "/" which allows
> the v4 clients to mount the same exports as does the v2/v3 clients.
> 
> Now if you do not what "/" as your default root, you can
> set fsid to something like fsid=/export. This will
> change to default root to the /export directory which
> means your v4 clients will only be able to access exports
> under the /export directory. 

I actually have some old patches that allow you to use an alternate root
for all NFS versions; you'd do something like:

	/exports	*(ro, root)
	/exports/foo	*(rw)
	/exports/bar	*(rw)

and then a v2, v3, or v4 client would mount server:/foo or server:/bar.

But that was just a fun project, it wasn't clear to me whether anyone
wanted it particularly.

Also, that didn't seem like a great user interface.  I'd rather have
something like

	rootpath=/exports
	foo	*(rw)
	bar	*(rw)

Actually, as long as we were doing that I'd rather replace /etc/exports
entirely; maybe do something like

	[nfsd]
		rootpath=/exports
	[export "foo"]
		clients=*
		options=rw
	[exports "bar"]
		clients=*
		options=rw

And also use the same file for other nfsd parameters:

	[nfsd]
		versions=2,3,4,4.1
		threads=8
		rootpath=/exports
	[export "foo"]
		...

I don't know.

--b.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFSv4 fsid=0 export still necessary?
  2011-12-06  1:10   ` J. Bruce Fields
@ 2011-12-07 16:30     ` Steve Dickson
  2011-12-07 16:32       ` J. Bruce Fields
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Dickson @ 2011-12-07 16:30 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Harald Dunkel, linux-nfs



On 12/05/2011 08:10 PM, J. Bruce Fields wrote:
> On Sat, Dec 03, 2011 at 11:51:19AM -0500, Steve Dickson wrote:
>> No, the fsid=0 export option is no longer necessary to make v4
>> exports compatible with v2/v3 exports. When the fsid option
>> is not set, the default root is define as "/" which allows
>> the v4 clients to mount the same exports as does the v2/v3 clients.
>>
>> Now if you do not what "/" as your default root, you can
>> set fsid to something like fsid=/export. This will
>> change to default root to the /export directory which
>> means your v4 clients will only be able to access exports
>> under the /export directory. 
> 
> I actually have some old patches that allow you to use an alternate root
> for all NFS versions; you'd do something like:
> 
> 	/exports	*(ro, root)
> 	/exports/foo	*(rw)
> 	/exports/bar	*(rw)
> 
> and then a v2, v3, or v4 client would mount server:/foo or server:/bar.
> 
> But that was just a fun project, it wasn't clear to me whether anyone
> wanted it particularly.
> 
> Also, that didn't seem like a great user interface.  I'd rather have
> something like
> 
> 	rootpath=/exports
> 	foo	*(rw)
> 	bar	*(rw)
> 
> Actually, as long as we were doing that I'd rather replace /etc/exports
> entirely; maybe do something like
> 
> 	[nfsd]
> 		rootpath=/exports
> 	[export "foo"]
> 		clients=*
> 		options=rw
> 	[exports "bar"]
> 		clients=*
> 		options=rw
> 
> And also use the same file for other nfsd parameters:
> 
> 	[nfsd]
> 		versions=2,3,4,4.1
> 		threads=8
> 		rootpath=/exports
> 	[export "foo"]
> 		...
I kinda like this idea... In the systemd world, its less
error prone to have daemons read their own configuration 
files... 

Where would this new file live and what would be called?

steved.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFSv4 fsid=0 export still necessary?
  2011-12-07 16:30     ` Steve Dickson
@ 2011-12-07 16:32       ` J. Bruce Fields
  2011-12-07 21:17         ` Steve Dickson
  0 siblings, 1 reply; 7+ messages in thread
From: J. Bruce Fields @ 2011-12-07 16:32 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Harald Dunkel, linux-nfs

On Wed, Dec 07, 2011 at 11:30:38AM -0500, Steve Dickson wrote:
> 
> 
> On 12/05/2011 08:10 PM, J. Bruce Fields wrote:
> > On Sat, Dec 03, 2011 at 11:51:19AM -0500, Steve Dickson wrote:
> >> No, the fsid=0 export option is no longer necessary to make v4
> >> exports compatible with v2/v3 exports. When the fsid option
> >> is not set, the default root is define as "/" which allows
> >> the v4 clients to mount the same exports as does the v2/v3 clients.
> >>
> >> Now if you do not what "/" as your default root, you can
> >> set fsid to something like fsid=/export. This will
> >> change to default root to the /export directory which
> >> means your v4 clients will only be able to access exports
> >> under the /export directory. 
> > 
> > I actually have some old patches that allow you to use an alternate root
> > for all NFS versions; you'd do something like:
> > 
> > 	/exports	*(ro, root)
> > 	/exports/foo	*(rw)
> > 	/exports/bar	*(rw)
> > 
> > and then a v2, v3, or v4 client would mount server:/foo or server:/bar.
> > 
> > But that was just a fun project, it wasn't clear to me whether anyone
> > wanted it particularly.
> > 
> > Also, that didn't seem like a great user interface.  I'd rather have
> > something like
> > 
> > 	rootpath=/exports
> > 	foo	*(rw)
> > 	bar	*(rw)
> > 
> > Actually, as long as we were doing that I'd rather replace /etc/exports
> > entirely; maybe do something like
> > 
> > 	[nfsd]
> > 		rootpath=/exports
> > 	[export "foo"]
> > 		clients=*
> > 		options=rw
> > 	[exports "bar"]
> > 		clients=*
> > 		options=rw
> > 
> > And also use the same file for other nfsd parameters:
> > 
> > 	[nfsd]
> > 		versions=2,3,4,4.1
> > 		threads=8
> > 		rootpath=/exports
> > 	[export "foo"]
> > 		...
> I kinda like this idea... In the systemd world, its less
> error prone to have daemons read their own configuration 
> files... 
> 
> Where would this new file live and what would be called?

I'm not sure.... Where did you end up putting the file for nfs mount
configuration?

--b.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFSv4 fsid=0 export still necessary?
  2011-12-07 16:32       ` J. Bruce Fields
@ 2011-12-07 21:17         ` Steve Dickson
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Dickson @ 2011-12-07 21:17 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: Harald Dunkel, linux-nfs



On 12/07/2011 11:32 AM, J. Bruce Fields wrote:
> On Wed, Dec 07, 2011 at 11:30:38AM -0500, Steve Dickson wrote:
>>
>>
>> On 12/05/2011 08:10 PM, J. Bruce Fields wrote:
>>> On Sat, Dec 03, 2011 at 11:51:19AM -0500, Steve Dickson wrote:
>>>> No, the fsid=0 export option is no longer necessary to make v4
>>>> exports compatible with v2/v3 exports. When the fsid option
>>>> is not set, the default root is define as "/" which allows
>>>> the v4 clients to mount the same exports as does the v2/v3 clients.
>>>>
>>>> Now if you do not what "/" as your default root, you can
>>>> set fsid to something like fsid=/export. This will
>>>> change to default root to the /export directory which
>>>> means your v4 clients will only be able to access exports
>>>> under the /export directory. 
>>>
>>> I actually have some old patches that allow you to use an alternate root
>>> for all NFS versions; you'd do something like:
>>>
>>> 	/exports	*(ro, root)
>>> 	/exports/foo	*(rw)
>>> 	/exports/bar	*(rw)
>>>
>>> and then a v2, v3, or v4 client would mount server:/foo or server:/bar.
>>>
>>> But that was just a fun project, it wasn't clear to me whether anyone
>>> wanted it particularly.
>>>
>>> Also, that didn't seem like a great user interface.  I'd rather have
>>> something like
>>>
>>> 	rootpath=/exports
>>> 	foo	*(rw)
>>> 	bar	*(rw)
>>>
>>> Actually, as long as we were doing that I'd rather replace /etc/exports
>>> entirely; maybe do something like
>>>
>>> 	[nfsd]
>>> 		rootpath=/exports
>>> 	[export "foo"]
>>> 		clients=*
>>> 		options=rw
>>> 	[exports "bar"]
>>> 		clients=*
>>> 		options=rw
>>>
>>> And also use the same file for other nfsd parameters:
>>>
>>> 	[nfsd]
>>> 		versions=2,3,4,4.1
>>> 		threads=8
>>> 		rootpath=/exports
>>> 	[export "foo"]
>>> 		...
>> I kinda like this idea... In the systemd world, its less
>> error prone to have daemons read their own configuration 
>> files... 
>>
>> Where would this new file live and what would be called?
> 
> I'm not sure.... Where did you end up putting the file for nfs mount
> configuration?

In /etc... /etc/nfsmount.conf... but /etc/default seems to be popular
these days...  

steved.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-07 21:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-03 11:21 NFSv4 fsid=0 export still necessary? Harald Dunkel
2011-12-03 13:56 ` Jim Rees
2011-12-03 16:51 ` Steve Dickson
2011-12-06  1:10   ` J. Bruce Fields
2011-12-07 16:30     ` Steve Dickson
2011-12-07 16:32       ` J. Bruce Fields
2011-12-07 21:17         ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).