Re: [Vserver] listing of --bind mounts

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Fri 25 Aug 2006 - 04:23:52 BST
Message-ID: <20060825032352.GC20625@MAIL.13thfloor.at>

On Thu, Aug 24, 2006 at 10:55:28AM -0700, Roderick A. Anderson wrote:
> Daniel Hokka Zakrisson wrote:
> >Roderick A. Anderson wrote:
> >
> >>It appears I'm clueless on this but I have RFTM or at least the man
> >>page for the mount command but still don't see a method.
> >>
> >>How do I get a listing of all the --bind (from
> >>/etc/vservers/$GUEST/fstab ) mounts from the host?
> >>
> >>All I'm seeing is the regular mounts; partitions, nfs, etc.
> >
> >
> >When you do what? I see the bind mounts just fine in /etc/mtab, as well
> >as /proc/mounts.
>
> From the host
> mount
> doesn't show them but a
> vserver $GUEST exec mount
> does.
>
> It appears to be a context thingy.

it actually is a 'namespace' thingy, so what you
want to do is enter _all_ namespaces and list their
view of the virtual filesystem layer ...

unfortunately mainline does not provide a simple way
to do so, but fortunately you can get away most of
the time by using vnamespace ...

> Anyway to run a command for all the 'active' contexts?

a generic context loop in bash looks like this:

 for n in `cd /proc/virtual && ls -d [1-9]*`; do echo $n; done

to enter a namespace use something like this:

 vnamespace -e <xid> -- <command> [<arg> ...]

HTH,
Herbert

> Rod
> --
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Fri Aug 25 04:54:47 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 25 Aug 2006 - 04:54:52 BST by hypermail 2.1.8