About this list Date view Thread view Subject view Author view Attachment view

From: Nuno Silva (nuno.silva_at_vgertech.com)
Date: Thu 08 May 2003 - 11:05:48 BST


Hello!

Mitchell Smith wrote:
> Hi,
>
> I am wondering if it is possible to enforce a disk quota on a virtual
> server?
>

Don't use a partition in a block device as the vserver's root. Use a
/dev/loop and mount it prior to starting the vserver.

# mount -o loop /vserver-images/vserver1.img /vservers/vserver1
# vserver vserver1 start

If you need to add 1GB to it:

# vserver vserver1 stop
# umount /vservers/vserver1
# dd if=/dev/zero of=/tmp/1GB bs=1M count=1000
# cat /tmp/1GB >> /vserver-images/vserver1.img
# resize2fs /vserver-images/vserver1.img

Regards,
Nuno Silva

> i.e. if I had /home/vservers as a 40 gb partition and I want to split it up
> between 4 vservers at 10 gb each, can I tell each vserver that it can only
> use 10 gb of that partition?
>
> I know I could just partition up the drive that way, but then it doesn't
> allow for resizing any of the vservers disk space, say I wanted to give one
> 25 gb and shrink the other 3 down to 5 gb, I couldn't do that with out some
> major repartitioning.
>
> Comments very welcome.
>
> From Mitchell
>
>


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 08 May 2003 - 11:35:34 BST by hypermail 2.1.3