[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Limitting diskuse per jail

On 10/04/10 03:09, Michiel Detailleur wrote:
On 10/03/10 20:20, Jack Raats wrote:
Is it possible to limit diskuse in a jail? e.g. jail one can use 30 GB,
jail 2 can use 10 GB.

I believe it was possible to use traditional quota(1) with users in jails on UFS2 in older releases of FreeBSD, but it got sort of broken and messy for a few releases (6.*?). So by far the easiest way to enforce size limits was to use image jails or create separate file systems.

Enter ZFS, which makes it really easy to create file systems, and the rest is history :)

IMHO it's a good practice to have every jail in its own filesystem.
Either using seperate partitions or with image files.
As many others on this list: we are using ZFS for this. It's easy, it's
on-the-fly and allows optimal use of your disk-space because you can just
set quota on the virtual filesystems/datasets and you are not forced in a
'fixed-forever' partitition layout.

Ezjail even has build-in support for this now!

In addition you gain snapshots, compression, etc. Also: if you have a
simple non-raid setup, you can still use it with all these benefits. You
just won't have any redundancy.

This is a very good point. The features you mentioned, plus ease of administration are major advantages of using ZFS even in a "one disk" scenario. ZFS is not just for "enterprise" use.