* Enforcing quota for root user
@ 2014-11-10 22:46 Cyril Scetbon
2014-11-11 6:56 ` Stan Hoeppner
0 siblings, 1 reply; 11+ messages in thread
From: Cyril Scetbon @ 2014-11-10 22:46 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: text/plain, Size: 210 bytes --]
Hi,
I'm trying to enforce quotas for the superuser without success. Can you tell me what I'm doing wrong ?
see http://pastebin.com/tpF6kVig <http://pastebin.com/tpF6kVig>
Thanks
--
Cyril SCETBON
[-- Attachment #1.2: Type: text/html, Size: 683 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-10 22:46 Enforcing quota for root user Cyril Scetbon
@ 2014-11-11 6:56 ` Stan Hoeppner
2014-11-11 10:22 ` Cyril Scetbon
0 siblings, 1 reply; 11+ messages in thread
From: Stan Hoeppner @ 2014-11-11 6:56 UTC (permalink / raw)
To: Cyril Scetbon, xfs
On 11/10/2014 04:46 PM, Cyril Scetbon wrote:
> Hi,
>
> I'm trying to enforce quotas for the superuser without success. Can you
> tell me what I'm doing wrong ?
http://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/ch08s04.html
Look at the last line.
Cheers,
Stan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 6:56 ` Stan Hoeppner
@ 2014-11-11 10:22 ` Cyril Scetbon
2014-11-11 15:36 ` Stan Hoeppner
0 siblings, 1 reply; 11+ messages in thread
From: Cyril Scetbon @ 2014-11-11 10:22 UTC (permalink / raw)
To: Stan Hoeppner; +Cc: xfs
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 ....
--
Cyril SCETBON
> On 11 Nov 2014, at 07:56, Stan Hoeppner <stan@hardwarefreak.com> wrote:
>
>
>
> On 11/10/2014 04:46 PM, Cyril Scetbon wrote:
>> Hi,
>>
>> I'm trying to enforce quotas for the superuser without success. Can you
>> tell me what I'm doing wrong ?
>
> http://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/ch08s04.html
>
> Look at the last line.
>
> Cheers,
> Stan
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 10:22 ` Cyril Scetbon
@ 2014-11-11 15:36 ` Stan Hoeppner
2014-11-11 18:00 ` Chris Murphy
2014-11-12 13:55 ` Cyril Scetbon
0 siblings, 2 replies; 11+ messages in thread
From: Stan Hoeppner @ 2014-11-11 15:36 UTC (permalink / raw)
To: Cyril Scetbon; +Cc: xfs
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?
Regards,
Stan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 15:36 ` Stan Hoeppner
@ 2014-11-11 18:00 ` Chris Murphy
2014-11-11 22:32 ` Dave Chinner
2014-11-12 13:55 ` Cyril Scetbon
1 sibling, 1 reply; 11+ messages in thread
From: Chris Murphy @ 2014-11-11 18:00 UTC (permalink / raw)
To: Stan Hoeppner, xfs
On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan@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.
[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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 18:00 ` Chris Murphy
@ 2014-11-11 22:32 ` Dave Chinner
2014-11-11 22:36 ` Eric Sandeen
2014-11-11 23:35 ` Chris Murphy
0 siblings, 2 replies; 11+ messages in thread
From: Dave Chinner @ 2014-11-11 22:32 UTC (permalink / raw)
To: Chris Murphy; +Cc: Stan Hoeppner, xfs
On Tue, Nov 11, 2014 at 11:00:25AM -0700, Chris Murphy wrote:
>
> On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan@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@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
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@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 22:32 ` Dave Chinner
@ 2014-11-11 22:36 ` Eric Sandeen
2014-11-11 23:34 ` Dave Chinner
2014-11-11 23:35 ` Chris Murphy
1 sibling, 1 reply; 11+ messages in thread
From: Eric Sandeen @ 2014-11-11 22:36 UTC (permalink / raw)
To: Dave Chinner, Chris Murphy; +Cc: Stan Hoeppner, xfs
On 11/11/14 4:32 PM, Dave Chinner wrote:
> On Tue, Nov 11, 2014 at 11:00:25AM -0700, Chris Murphy wrote:
>>
>> On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan@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.
However, at least according to the manpage, "project ID 0" is not
enforced. Granted, that is not a *user* exception.
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 22:36 ` Eric Sandeen
@ 2014-11-11 23:34 ` Dave Chinner
0 siblings, 0 replies; 11+ messages in thread
From: Dave Chinner @ 2014-11-11 23:34 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Chris Murphy, Stan Hoeppner, xfs
On Tue, Nov 11, 2014 at 04:36:43PM -0600, Eric Sandeen wrote:
> On 11/11/14 4:32 PM, Dave Chinner wrote:
> > On Tue, Nov 11, 2014 at 11:00:25AM -0700, Chris Murphy wrote:
> >>
> >> On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan@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.
>
> However, at least according to the manpage, "project ID 0" is not
> enforced. Granted, that is not a *user* exception.
Correct, and again by intent and design as project quotas are
optional. i.e. there has to be some way of ensuring non-project ID
controlled files won't have quota enforcement applied to them. ;)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 22:32 ` Dave Chinner
2014-11-11 22:36 ` Eric Sandeen
@ 2014-11-11 23:35 ` Chris Murphy
2014-11-12 0:09 ` Dave Chinner
1 sibling, 1 reply; 11+ messages in thread
From: Chris Murphy @ 2014-11-11 23:35 UTC (permalink / raw)
To: Dave Chinner; +Cc: Stan Hoeppner, xfs@oss.sgi.com
[-- Attachment #1.1: Type: text/plain, Size: 2632 bytes --]
On Nov 11, 2014, at 3:32 PM, Dave Chinner <david@fromorbit.com> wrote:
> On Tue, Nov 11, 2014 at 11:00:25AM -0700, Chris Murphy wrote:
>>
>> On Nov 11, 2014, at 8:36 AM, Stan Hoeppner <stan@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.
It’s what I’d expect. I considered the documentation to be slightly misleading where is says soft and hard limits are never applied to the root user. The project quota does have a soft and hard limit. The soft limit, seemed not to apply to the root user - at least there was no soft limit warning anywhere when it was busted. But the hard limit definitely applied.
http://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/ch08s04.html
>
>> [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
>
> 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?
No that VM is gone so I can’t check it, I’d have to redo the test. Since at the time I was also testing Btrfs stuff I’m going to say it was at the oldest 3.17.1, and could have been 3.18rc1 or rc2.
Chris Murphy
[-- Attachment #1.2: Type: text/html, Size: 3988 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 23:35 ` Chris Murphy
@ 2014-11-12 0:09 ` Dave Chinner
0 siblings, 0 replies; 11+ messages in thread
From: Dave Chinner @ 2014-11-12 0:09 UTC (permalink / raw)
To: Chris Murphy; +Cc: Stan Hoeppner, xfs@oss.sgi.com
On Tue, Nov 11, 2014 at 04:35:31PM -0700, Chris Murphy wrote:
>
> On Nov 11, 2014, at 3:32 PM, Dave Chinner <david@fromorbit.com>
> wrote:
>
> > On Tue, Nov 11, 2014 at 11:00:25AM -0700, Chris Murphy wrote:
> >>
> >> On Nov 11, 2014, at 8:36 AM, Stan Hoeppner
> >> <stan@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.
>
> It’s what I’d expect. I considered the documentation to be
> slightly misleading where is says soft and hard limits are never
> applied to the root user. The project quota does have a soft and
> hard limit. The soft limit, seemed not to apply to the root user -
> at least there was no soft limit warning anywhere when it was
> busted. But the hard limit definitely applied.
>
> http://xfs.org/docs/xfsdocs-xml-dev/XFS_User_Guide/tmp/en-US/html/ch08s04.html
So write a patch to fix the documentation. Repo is here:
git://git.kernel.org/pub/scm/fs/xfs/xfsdocs-xml-dev.git
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Enforcing quota for root user
2014-11-11 15:36 ` Stan Hoeppner
2014-11-11 18:00 ` Chris Murphy
@ 2014-11-12 13:55 ` Cyril Scetbon
1 sibling, 0 replies; 11+ messages in thread
From: Cyril Scetbon @ 2014-11-12 13:55 UTC (permalink / raw)
To: Stan Hoeppner; +Cc: xfs
--
Cyril SCETBON
> 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.
Cool I'm not crazy :)
> Why would you want to enforce quotas for root?
Cause I'm using a software that must be launched as root (a limitation that should be removed in the future) and I want to apply quota to that one !
> Regards,
> Stan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-11-12 13:56 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 22:46 Enforcing quota for root user Cyril Scetbon
2014-11-11 6:56 ` Stan Hoeppner
2014-11-11 10:22 ` Cyril Scetbon
2014-11-11 15:36 ` Stan Hoeppner
2014-11-11 18:00 ` Chris Murphy
2014-11-11 22:32 ` Dave Chinner
2014-11-11 22:36 ` Eric Sandeen
2014-11-11 23:34 ` Dave Chinner
2014-11-11 23:35 ` Chris Murphy
2014-11-12 0:09 ` Dave Chinner
2014-11-12 13:55 ` Cyril Scetbon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox