Re: [Vserver] Re: Quota for guest servers on /vservers, /vservers is on LVM ext3

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Wed 19 Oct 2005 - 11:37:25 BST
Message-ID: <20051019103724.GA9647@MAIL.13thfloor.at>

On Tue, Oct 18, 2005 at 06:28:13PM -0700, Steven Truong wrote:
> Oops. I found out that I could set S_CONTEXT in
> /etc/vservers/lanweb.conf to set the context id. Here is my
> lanweb.conf

a few comments here ...

 - the config you use (one config file) is called legacy
   config and was replaced (about a year ago) by a new,
   tree-based config

> IPROOT="192.168.0.78"
> IPROOTMASK="255.255.255.0"
> IPROOTDEV="eth1"

- specifying the network in this way _might_ have some
  unexpected sideeffects if you decide to add new ips

> S_HOSTNAME="lanweb"
> S_DOMAINNAME="none"

- you probably do not use yellow pages (nis) so the
  S_DOMAINNAME does not really make sense

> ONBOOT="no"
> S_CAPS="CAP_NET_RAW"

- you give RAW network access, which basically allows
  any guest root to sniff all your traffic on eth1

> S_CONTEXT=10

- this is fine, a restart (given that the tools even
  look at your config file) will use the xid=10

> Once I got lanweb started and then entered it by root. At the prompt
> of the host, I did
>
> vserver lanweb status
>
> and here is the output:
> Vserver 'lanweb' is running at context '49153'
> Number of processes: 3
> Uptime: 00:02
>
> I did set S_CONTEXT="10" just in case I did not set it correctly.
> However, in both case, my context is not 10 and always different
> numbers. Is there any restrictions on the range of context id?

> Is this kind of servername.conf configuration file a legacy stuff too?

guess that was answered above ...

> What could be wrong here? Could some expert give me some info on this?
> I would like to solve this so I can have a context id for my guest
> server to set up quota on it.

if you use a newstyle config (tree) then you would
simply do

 echo "10" >/etc/vservers/lanweb/context

and restart the guest with

 vserver lanweb restart

HTH,
Herbert

PS: output of testme.sh (see testing basic functionality)
would have been very useful in telling _what_ you actually
use ...

> Thanks.
> Steven.
> On 10/18/05, Steven Truong <djatlantic@gmail.com> wrote:
> >
> > Thanks Mr. *Gorecki and Chuck for the answers. I have a question regarding
> > http://linux-vserver.org/Disk+Limits . I created my vserver without
> > specifying the context number, so do I need to fix it or have to rebuild the
> > guest server with a context number, or could I just append to the guest
> > server the context number (if possible)?
> >
> > Regarding to Chuck's method, I think it is a bit different for my case
> > because /vservers is already a logical volume, and I can resize /vserver as
> > a whole partition.
> >
> > Best regards,
> > Steven.
> > *
> > On 10/18/05, Steven Truong <djatlantic@gmail.com> wrote:
> > >
> > > Hi, all. After reading some of the messages regarding quota, I would
> > > like to implement quota for the guest servers on a LVM partition /vservers.
> > > I only care to limit the amount of space a guest server could use and I do
> > > not care about the per user quota in each guest.
> > >
> > > I found this link from a recent message and wonder if the instructions
> > > applied to my situations.
> > > http://linux-vserver.org/Standard+non-shared+quota
> > >
> > > And how LVM could assist in limiting disk space of each guest server?
> > > (If by any means)
> > >
> > > Please assist me in this attempt.
> > > Thanks.
> > >
> >
> >

> _______________________________________________
> 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 Wed Oct 19 11:37:45 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 19 Oct 2005 - 11:37:52 BST by hypermail 2.1.8