Re: [Vserver] How multiple disk limits within a guest are supposed to work?

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Wed 24 May 2006 - 15:41:12 BST
Message-ID: <20060524144112.GC23259@MAIL.13thfloor.at>

On Tue, May 23, 2006 at 10:52:43AM -0400, Francis J. Lacoste wrote:
> Hi,
>
> I've read the DiskLimits documentation on
> http://linux-vserver.org/Disk+Limits

> and I've able to set-up one disk limit on a guest vserver without
> problem.
>
> But I'm wondering how multiple disk limits within the same context
> are supposed to work. It seems that you can configure multiple limit
> within the same context:
>
> mkdir -p /etc/vservers/test1/dlimits/site1
> echo /vservers/test1/var/www/site1
> > /etc/vservers/test1/dlimits/site1/directory
> echo $(( 50 * 1024 )) > /etc/vservers/test1/dlimits/site1/space_total
>
> mkdir -p /etc/vservers/test1/dlimits/site2
> echo /vservers/test1/var/www/site2
> > /etc/vservers/test1/dlimits/site2/directory
> echo $(( 50 * 1024 )) > /etc/vservers/test1/dlimits/site2/space_total

it seems you are confusing multiple limits (i.e.
limits for more than one partition) for each guest
with directory based disk limits (which are not
easy to accomplish with any unix filesystem)

> I was hoping that would limit the context to 50M inside the
> /var/www/site1 directory and 50M inside the /var/www/site2 directory.
> But it doesn't seem to work that way.

it works that way if you make /var/www/site1 and
/var/www/site2 different partitions, you might
still share those partitions with other guests
(with different context ids)

> It seems that the overall limit for the context is 50M and that the
> size of both directory is accounted toward that limit. (Running df
> inside the guest shows 50M of total space and 30M used because there
> is 20M in one directory and 10M in another.)

> Also, I've noticed that if I fill the space inside the
> /var/www/site1 directory. I cannot create file anywhere else inside
> the guest.
>
> So can someone explain to me how multiple dlimits inside the same
> guest should work?

let's assume you have /vservers and /home and
(for whatever reason) you do something like:

/vservers/guest1 with /home/guest1 rbind mounted
into /vservers/guest1/home, then you can set
a limit for guest1 (actually /vservers) and
another limit for /vservers/guest1/home (actually
 /home)

> Thanks for all the help you can provide!

HTH,
Herbert

> P.S. I'm using the stable vserver 2.0.2-rc20 with then 2.6.16.16
> kernel and util-vserver 0.30.210.
>
> --
> Francis J. Lacoste
> francis@Contre.COM

> _______________________________________________
> 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 May 24 15:41:43 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 24 May 2006 - 15:41:50 BST by hypermail 2.1.8