9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] bind, ns weirdness
@ 2003-03-06 23:52 Keith Nash
  2003-03-06 21:18 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Nash @ 2003-03-06 23:52 UTC (permalink / raw)
  To: 9fans

It seems a pity if there are valid namespaces that are not described by the present form of ns.

A possible solution is for /proc/$pid/ns to report every mount, bind and unmount that was ever executed by the process.  Why attempt to 'simplify' this script by removing matched groups of bind/mount and unmount, if the simplified script can't always tell us how the namespace was constructed?

Keith.



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [9fans] bind, ns weirdness
@ 2003-03-07  1:32 Joel Salomon
  2003-03-06 22:51 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Joel Salomon @ 2003-03-07  1:32 UTC (permalink / raw)
  To: 9fans

> perhaps some stub should remain in
> the in-order list that has an empty 
> chan structure with just a name,
> so that the ns list is correct.  perhaps.

Would these stubs be #* style names (names outside of namespace)?
Still open chans might be given a # type name automagically if the
original is no longer in the namespace. Or is this being overly clever?

--Joel



^ permalink raw reply	[flat|nested] 6+ messages in thread
* [9fans] bind, ns weirdness
@ 2003-03-06 21:58 Keith Nash
  2003-03-06 22:16 ` David Presotto
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Nash @ 2003-03-06 21:58 UTC (permalink / raw)
  To: 9fans

If, on my 4th Edition terminal, I run
   unmount /
then the binds
   bind / /
   bind -a /root /
   mount -a '#s/boot' /
get removed from the output of ns, as expected; the command
   ls -l /
shows that, indeed, the directories originally bound from the kfs disk /root are no longer there: only the files from '#/' are present.

There are two strange outcomes, which are probably related:

(1) 'man 1 ns' describes the output of ns as a script that could, in principle, recreate the name space.  The commands
bind /386/bin /bin
bind -a /rc/bin /bin
are still in the output from ns.  But /386 and /rc no longer exist; more importantly, /386 and /rc do not exist at the stage in the script when these binds would be run.

(2) ls and other commands in /bin that came from /386/bin can still be executed, although the bind that provides them is now nonsense; and ls -l /bin reports that the files from /386/bin and /rc/bin are still there - although only the former can be executed.

This situation persists even if I also unmount /root; but if I unmount /bin, the commands all disappear, as expected.

I have tried removing the -C flag from
mount -aC #s/boot /root $rootspec
in /lib/namespace, and rebooting, in case caching is having unexpected results.  This has no effect.

I would be grateful for any explanations!


Keith.



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

end of thread, other threads:[~2003-03-07  1:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-06 23:52 [9fans] bind, ns weirdness Keith Nash
2003-03-06 21:18 ` Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
2003-03-07  1:32 Joel Salomon
2003-03-06 22:51 ` Russ Cox
2003-03-06 21:58 Keith Nash
2003-03-06 22:16 ` David Presotto

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