Question about project quota with container

Jeff Liu
2012-02-29T04:49:20Z

Hello,

Recently, I myself working on a RFC/PATCH regarding supply quota
supports to Linux container.

Per my investigation, looks the project quota feature in XFS is a great
start point, so that all the tasks/processes running at a particular
container(most likely in a virtual guest environment) would have
constrained by project quota. Project quota is pretty cool, thank you
guys for working it out!

Now I have two rough ideas related to combine container with XFS:

The first choice is, mount XFS with PQUOTA option, place the virtual
guest on XFS disk, and setup project quota on the desired directory in
the first place, then assign the project_id to container via cgroup
control files.
The limits value(i.e, inode quota/block quota are setup based on cgroup
control files too). In this case, there is no need to specify those
limits via xfs_quota(1).

However, to implement that, the projects directory path and project id
are still need to configured at /etc/projects && /etc/projid firstly if
they are not setup through command line directly. Or even they are
configured via command line, but those two files will still be take into
account if they are presented.

I was wondering if other file system will also implement project quota
based on these two configuration files in the future? In other words, is
it a standard?

Alternatively, maybe the project path and ID can be setup at cgroup
control files too, the following things could be implemented like
"xfsprogs/quota/edit.c", but I would put aside this idea for now.

Would you guys please give any suggestions?

Thanks in advance!
-Jeff