9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] newns(2) and fileservers
@ 2013-02-02  0:21 erik quanstrom
  2013-02-02  4:04 ` cinap_lenrek
  2013-02-08 18:42 ` Ярослав Коломієць
  0 siblings, 2 replies; 8+ messages in thread
From: erik quanstrom @ 2013-02-02  0:21 UTC (permalink / raw)
  To: 9fans

i want to use /lib/namespace.$servername to mount
a second file server.  the second file server is not running
exportfs; and i would like to mount it directly
and not import it.

i think i must be missing something, but i can't figure out
how to do this.

	import fruitcake!9fs / /n/fruitcake

doesn't work (and in fact hangs) because fruitcake isn't
listening to exportfs.  "mount" doesn't work because it
requires open not dial to yield a fd.

am i missing something?  if so, how do i do this?

if not, then i propose the following change to
/sys/src/libauth/newns.c:

static int
callexport(char *sys, char *tree)
{
	char *na, buf[3];
	int fd;
	AuthInfo *ai;

	na = netmkaddr(sys, 0, "exportfs");
	if((fd = dial(na, 0, 0, 0)) < 0)
		return -1;
>>	if(strstr(na, "!exportfs") == nil)
>>		return fd;

i agree that "import" as the directive seems a bit
wrong.  perhaps a more extensive change could be worked
up for a new verb called "srv" or some such?

- erik



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  0:21 [9fans] newns(2) and fileservers erik quanstrom
@ 2013-02-02  4:04 ` cinap_lenrek
  2013-02-02  4:16   ` erik quanstrom
  2013-02-08 18:42 ` Ярослав Коломієць
  1 sibling, 1 reply; 8+ messages in thread
From: cinap_lenrek @ 2013-02-02  4:04 UTC (permalink / raw)
  To: 9fans

why do you want to dial a new connection all the time when the namespace
is created? 9fs multiplexes multiple attaches thru a single connection.
so all you need is to run srv once, which would yield a file in /srv,
and then just mount that in your namespace file no?

--
cinap



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  4:04 ` cinap_lenrek
@ 2013-02-02  4:16   ` erik quanstrom
  2013-02-02  4:35     ` cinap_lenrek
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2013-02-02  4:16 UTC (permalink / raw)
  To: 9fans

On Fri Feb  1 23:06:03 EST 2013, cinap_lenrek@gmx.de wrote:
> why do you want to dial a new connection all the time when the namespace
> is created? 9fs multiplexes multiple attaches thru a single connection.
> so all you need is to run srv once, which would yield a file in /srv,
> and then just mount that in your namespace file no?

it turns out that i do want it that way.

but let's turn things around, you could make the smae
argument against the existing import statement.

- erik



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  4:16   ` erik quanstrom
@ 2013-02-02  4:35     ` cinap_lenrek
  2013-02-02  4:41       ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: cinap_lenrek @ 2013-02-02  4:35 UTC (permalink / raw)
  To: 9fans

          A process is started on the remote machine, with authority
          of the user of import, to perform work for the local machine
          using the exportfs(4) service.

--
cinap



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  4:35     ` cinap_lenrek
@ 2013-02-02  4:41       ` erik quanstrom
  2013-02-02  5:07         ` cinap_lenrek
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2013-02-02  4:41 UTC (permalink / raw)
  To: 9fans

On Fri Feb  1 23:36:38 EST 2013, cinap_lenrek@gmx.de wrote:
>           A process is started on the remote machine, with authority
>           of the user of import, to perform work for the local machine
>           using the exportfs(4) service.

which sort of begs the question.

either a connection to the fs (via export or 9fs) is expensive, or it is not.
if you can afford a connection per process group for export, then why
can't you afford it for 9fs? ☺

- erik



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  4:41       ` erik quanstrom
@ 2013-02-02  5:07         ` cinap_lenrek
  2013-02-02  5:14           ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: cinap_lenrek @ 2013-02-02  5:07 UTC (permalink / raw)
  To: 9fans

its not that i think. its that import makes a connection
and then authenticates the user (then might push ssl) and
then mounts. where 9fs, it doesnt matter who makes the
connection, and authentication is done for every attach/mount.

a namespace is created for a specific user. so to authenticate
with import, it has to make a new connection every time to
run the authentication.

--
cinap



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  5:07         ` cinap_lenrek
@ 2013-02-02  5:14           ` erik quanstrom
  0 siblings, 0 replies; 8+ messages in thread
From: erik quanstrom @ 2013-02-02  5:14 UTC (permalink / raw)
  To: 9fans

On Sat Feb  2 00:08:41 EST 2013, cinap_lenrek@gmx.de wrote:
> its not that i think. its that import makes a connection
> and then authenticates the user (then might push ssl) and
> then mounts. where 9fs, it doesnt matter who makes the
> connection, and authentication is done for every attach/mount.
>
> a namespace is created for a specific user. so to authenticate
> with import, it has to make a new connection every time to
> run the authentication.

well known and not really realated to my question.

- erik



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

* Re: [9fans] newns(2) and fileservers
  2013-02-02  0:21 [9fans] newns(2) and fileservers erik quanstrom
  2013-02-02  4:04 ` cinap_lenrek
@ 2013-02-08 18:42 ` Ярослав Коломієць
  1 sibling, 0 replies; 8+ messages in thread
From: Ярослав Коломієць @ 2013-02-08 18:42 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs



2 лют. 2013 о 02:21 erik quanstrom <quanstro@quanstro.net> написав(ла):

> i want to use /lib/namespace.$servername to mount
> a second file server.  the second file server is not running
> exportfs; and i would like to mount it directly
> and not import it.

We used to run srv(4) from a startup script for this purpose.




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

end of thread, other threads:[~2013-02-08 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-02  0:21 [9fans] newns(2) and fileservers erik quanstrom
2013-02-02  4:04 ` cinap_lenrek
2013-02-02  4:16   ` erik quanstrom
2013-02-02  4:35     ` cinap_lenrek
2013-02-02  4:41       ` erik quanstrom
2013-02-02  5:07         ` cinap_lenrek
2013-02-02  5:14           ` erik quanstrom
2013-02-08 18:42 ` Ярослав Коломієць

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).