Enforcing quota for root user
Dave Chinner
david at fromorbit.com
Tue Nov 11 16:32:03 CST 2014
On Tue, Nov 11, 2014 at 11:00:25AM -0700, Chris Murphy wrote:
>
> On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan at hardwarefreak.com> 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.
By intent and design. Project quotas are not a user/group based
quota and so there is no exemption for any user.
> [root at 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 at 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 at 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
It's gone negative. That number in hex: 0x7FFFFFFFFFFE7000
What kernel are you using, and can you outline all the way you set
everything up to cause that to occur? Also, what is the output of a
plain 'df -h' when it is in that state?
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list