On Wed, Feb 27, 2002 at 03:03:11PM -0600, Kirk Strauser wrote:
> At 2002-02-27T20:49:18Z, Patrick Thomas <[EMAIL PROTECTED]> writes:
> > I would like to put a large number of jails (16 or 20) on a server for
> > testing purposes.
> > 
> > I have two options so far: create 16 or 20 partitions OR just put them all
> > in one partition, but the downside of that is that then I cannot enforce
> > disk usage between jails.  So at this point, 16-20 partitions seems the
> > safest route.
> 
> Good question.  Is there any ability at all within the system to set a quota
> on a jail?

Each vn* device has to be baced by a physical file on the system.
Simply make sure that this physical device is the maximum size you want
to allow in the jail.

For example, on a server with 160GB of (RAID) disk, and 12 jails, each 10GB 
in size, I just have 12 jails;

On the 'master' host for the jails.

    # cd /usr/local/jails/disk-images
    # ls -l
    totall 1758115
    drwxr-xr-x  2 root  wheel          512 Jan 23 00:40 .
    drwxr-xr-x  4 root  wheel          512 Jan 23 00:39 ..
    -rw-r--r--  1 root  wheel          136 Jan 22 18:45 README
    -rw-r--r--  1 root  wheel  10737418240 Feb 27 23:35 foo.com.vn
    -rw-r--r--  1 root  wheel  10737418240 Feb 27 23:35 bar.com.vn
    -rw-r--r--  1 root  wheel  10737418240 Feb 27 23:35 baz.com.vn
    ...

These were created with "truncate 10G file", and are then mounted
configued on different vn* devices, which are then mounted as normal.

    # mount
    ...
    /dev/vn0a on /usr/local/jails/foo.com
    /dev/vn1a on /usr/local/jails/bar.com
    /dev/vn2a on /usr/local/jails/baz.com
    ...

N
-- 
FreeBSD: The Power to Serve      http://www.freebsd.org/               (__)
FreeBSD Documentation Project    http://www.freebsd.org/docproj/    \\\'',)
                                                                      \/  \ ^
   --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---         .\._/_)

Attachment: msg32219/pgp00000.pgp
Description: PGP signature

Reply via email to