Hi,
Are you
familiar with project quotas on XFS? They allow you to place a
quota on a subdirectory tree without phaffing with user or group ownerships.
No I wasn't. This looks interesting. Do you happen to know if it
works for multiple directory trees?
e.g. given
/srv/backups/hourly.0/1.2.3.4/
/srv/backups/hourly.1/1.2.3.4/
can a quota be enforced for the total of
/srv/backups/hourly.0/1.2.3.4/ and /srv/backups/hourly.1/1.2.3.4/?
I'm not sure. I always have to read the manual page for xfs_quota when I
use it. I only have projects that have a single directory but it looks
like you can assign directories to projects and then apply quotas to the
projects rather than the directories.
When I use 'quot -ap' to summaries all project usage it tells me the
usage of each project on each mount point. So I'd expect that if you
listed multiple entries in /etc/projects like so
-----
11:/srv/backups/hourly.0/1.2.3.4/
11:/srv/backups/hourly.1/1.2.3.4/
12:/srv/backups/hourly.0/5.6.7.8/
12:/srv/backups/hourly.1/5.6.7.8/
-----
with mappings in /etc/projid like so:
-----
user1:11
user2:12
-----
...then you might have some success.
A cursory test suggests that 'project user2' seems to think about doing
the right thing.
Remember to invoke xfs_quota with the -x flag: if you forget then it
doesn't end up being a very useful command.
Regards,
@ndy
--
andyjpb(a)ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF