xfs
[Top] [All Lists]

Re: Enforcing quota for root user

To: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: Enforcing quota for root user
From: Chris Murphy <lists@xxxxxxxxxxxxxxxxx>
Date: Tue, 11 Nov 2014 11:00:25 -0700
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <54622CE8.7050508@xxxxxxxxxxxxxxxxx>
References: <67EDE14C-CCFB-4B42-8B78-FC6C813CD19A@xxxxxxx> <5461B333.8050609@xxxxxxxxxxxxxxxxx> <F7ACFF71-460D-40E7-999C-BFC8D232EA81@xxxxxxx> <54622CE8.7050508@xxxxxxxxxxxxxxxxx>
On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx> wrote:

> On 11/11/2014 04:22 AM, Cyril Scetbon wrote:
>> That's what I've read first, but someone showed me a sample where it works. 
>> He just told me he was using project quota. However, does it make sense ? 
>> I've also read somewhere else that quota is never enforced for root user 
>> (id,gid=0) that's why I was testing it ....
> 
> No, it doesn't make sense.  Why would you want to enforce quotas for root?

A week ago I tried this and project quotas appear to apply to root.

[root@localhost project_quota_test1]# xfs_quota -c df
Filesystem           1K-blocks       Used  Available  Use% Pathname
/dev/sdb              83845120     157980   83687140    0% /xfs_local
/dev/sdb                102400     124928 9223372036854753280  122% 
/xfs_local/project_quota_test1
[root@localhost project_quota_test1]# dd if=/dev/zero of=test100MB bs=1M 
count=100
dd: error writing ‘test100MB’: No space left on device
79+0 records in
78+0 records out
81788928 bytes (82 MB) copied, 0.163849 s, 499 MB/s
[root@localhost project_quota_test1]# xfs_quota -c df
Filesystem           1K-blocks       Used  Available  Use% Pathname
/dev/sdb              83845120     237748   83607372    0% /xfs_local
/dev/sdb                102400     204800 9223372036854673408  200% 
/xfs_local/project_quota_test1


The available space value seems like a bug, at least it’s not a sane/helpful 
value. But I do get a no space left on device, and the file being written is 
truncated at the hard limit for that project (directory).


Chris Murphy
<Prev in Thread] Current Thread [Next in Thread>