Quota per directory

Simo Sorce ssorce at redhat.com
Thu Mar 22 17:01:46 UTC 2007


On Thu, 2007-03-22 at 12:15 -0400, Oisin Feeley wrote:
> On 3/21/07, Lamont Peterson <lamont at gurulabs.com> wrote:
> > On Wednesday 21 March 2007 02:14am, Ahmed Kamal wrote:
> > > Coming from a systems administration background, I was very surprised to
> > > find out that fedora (well Linux actually) doesn't have a per directory
> > > quota. It is very common and needed IMHO to have a quota per directory, as
> > > the directory basically represents a project some people are working on.
> > > One would want to make sure that a certain project would not consume all
> > > disk space. Only XFS seemed to have per "project" quota (I even think the
> > > Linux implementation doesn't have that!)
> >
> > Linux "only" has per-filesystem quota support.  You're asking for what's
> > called "tree quotas" support.
> 
> What would be wrong with the OP using LVM to set up defined logical
> volumes per project?  The quota is then enforced, it sits on top of
> standard ext3 and provides the possibility of expanding/changing the
> quotas in the future while bypassing the need to do the tree-quota
> stuff.

projects: a, b, c

if ((quota(a) + quota(b) + quota(c)) < totaldiskspace) {
	broken(idea);
	exit;
}

:-)

Also broken if you have > 10-20 projects, becomes unmanageable.


But there is another possible way, use ACLs, and set by default the
group owner of all files under the project head directory to a specific
group matched to the project (you want to do that anyway to give rw to
the group), then set a group quotas.


Simo.




More information about the fedora-devel-list mailing list