From: Sam Vilain (sam_at_vilain.net)
Date: Fri 05 Nov 2004 - 01:41:46 GMT
Herbert Poetzl wrote:
> I guess we should move away from what we have now, get
> some distance, and think about what we want to have
> in let's say half a year (or maybe a year) then start
> to work in that direction ...
Alright! Well, Christmas is coming, so from context 0 (or 1) I'd like
to be able to do this (unless the context has a flag set):
# ls /proc/virtual/61823/namespace
bin dev home lib media opt root srv tmp var
boot etc initrd lost+found mnt proc sbin sys usr
And I want it to give a different device number inside there so I can
use `find -xdev' on /proc to just search proc, not the filesystems of
all the vservers too.
And I want to be able to do this:
# mount --rbind /proc/virtual/61823/namespace /mnt/foo
And I want this to opportunistically create a new namespace and
automatically get rid of unreachable mounts:
# chroot /mnt/foo/. sh -c "cat /proc/mounts"
/dev/root / ext3 rw 0 0
procns /proc proc rw,nodiratime 0 0
shmns /tmp tmpfs rw 0 0
ptsns /dev/pts devpts rw 0 0
I'd like /proc/PID/mounts to be:
- a symlink to /proc/mounts if the namespace hasn't been changed from
the last pivot_root (or boot) in the host system, or if it is the
same as the ``system'' namespace, if such a thing exists
- a symlink to /proc/virtual/XID/mounts, if the process is `in' the
context in namespace terms
- a normal file, straight after a CLONE_NS, which has the same inode
number on the /proc filesystem as any process with that namespace,
and the number of links on it corresponds to the number of processes
in that namespace.
Maybe also, similarly with /proc/PID/namespace, a symlink to "/",
"/proc/virtual/XID/namespace", or a real directory.
And I want them all to virtualise magically so that you can create a
vserver that can have vservers within it and not be able to tell the
difference just by looking at /proc/mounts or /proc/PID/namespace. And
I don't want to have to give contexts full mount ability to do that.
And I want the implementation to think of a day when the we can have
vservers within vservers, maybe an s_context has a parent s_context.
(Zombie contexts! yay!)
And I want to be able to kill off all processes on my context 0 system,
get init to chroot(2) into a new filesystem I made, then all the other
mounted filesystems just fall off the bottom of the mounts table and get
umounted (as no namespaces are referring to them).
And I'd like a Pony.
-- Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13 (include my PGP key ID in personal replies to avoid spam filtering) _______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver