All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Desantis <desantis@mail.usf.edu>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: (Un)known issue with XFS group quotas on LVM?
Date: Fri, 13 Jun 2014 10:50:19 -0400	[thread overview]
Message-ID: <CA+Bg6weoSsNH=g7PJQfnafHk1TthCvzSQ9MRSsBWExyNhS1s9Q@mail.gmail.com> (raw)
In-Reply-To: <20140613000137.GV9508@dastard>

Dave,

> Order doesn't matter because the filesystem is supposed to check
> against all enforced quotas, not just the first one.

Thanks for confirming.

> Again, you need to post the commands and output that demonstrate the
> problem you are describing. I'm having trouble understanding what
> your problem is because I can't see the raw output that you are
> seeing...

Ok, here are the default user and group quotas of my test account:

xfs_quota> quota -uh desantis.admin
Disk quotas for User desantis.admin (663800172)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
               256K      0      0  00 [------] /export/shares

xfs_quota> quota -gh rcadm
Disk quotas for Group rcadm (1034)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
              43.5G      0      0  00 [------] /export/shares

Now, we'll limit them and then re-display the quotas:

xfs_quota> limit -g bsoft=50G bhard=50G rcadm
xfs_quota> limit -u bsoft=10G bhard=10G desantis.admin

xfs_quota> quota -uh desantis.admin
Disk quotas for User desantis.admin (663800172)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
               256K    10G    10G  00 [------] /export/shares

xfs_quota> quota -gh rcadm
Disk quotas for Group rcadm (1034)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
              43.5G    50G    50G  00 [------] /export/shares

Here come the tests:

# sudo -u desantis.admin -g rcadm dd if=/dev/zero
of=/export/shares/rcadm/testfile_1 bs=1024M count=11
dd: writing `/export/shares/rcadm/testfile_1': Disk quota exceeded
7+0 records in
6+0 records out
6933651456 bytes (6.9 GB) copied, 19.7811 s, 351 MB/s

xfs_quota> quota -uh desantis.admin
Disk quotas for User desantis.admin (663800172)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
               6.5G    10G    10G  00 [------] /export/shares

xfs_quota> limit -u bsoft=0 bhard=0 desantis.admin

xfs_quota> quota -uh desantis.admin
Disk quotas for User desantis.admin (663800172)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
               6.5G      0      0  00 [------] /export/shares

# sudo -u desantis.admin -g rcadm dd if=/dev/zero
of=/export/shares/rcadm/testfile_1 bs=1024M count=5
5+0 records in
5+0 records out
5368709120 bytes (5.4 GB) copied, 10.8275 s, 496 MB/s

# sudo -u desantis.admin -g rcadm dd if=/dev/zero
of=/export/shares/rcadm/testfile_2 bs=1024M count=5
dd: writing `/export/shares/rcadm/testfile_2': Disk quota exceeded
1+0 records in
0+0 records out
1028136960 bytes (1.0 GB) copied, 4.60859 s, 223 MB/s

xfs_quota> quota -gh rcadm
Disk quotas for Group rcadm (1034)
Filesystem   Blocks  Quota  Limit Warn/Time    Mounted on
/dev/mapper/vg_drbd-shares
              50.0G    50G    50G  00 [------] /export/shares


As you can see with the output, my user quota of 10 GB was enforced
over the higher group quota of 50 GB.  My original thought process was
that since the file being created was specified for the group with the
larger quota, that XFS would enforce that limit over the user quota.
After reading over several pieces of quota documentation (RTFM!) from
different O.S. distributions, it looks like you can either have a user
or group quota getting enforced, but not both in the sense I was
originally thinking.

That being said, I really do appreciate the responses and extra set of
eyes and apologize if I've wasted too much time.

John DeSantis

2014-06-12 20:01 GMT-04:00 Dave Chinner <david@fromorbit.com>:
> On Thu, Jun 12, 2014 at 10:04:29AM -0400, John Desantis wrote:
>> Dave,
>>
>> Thanks for your reply.  Let me address your questions and replies.
>>
>> > That doesn't sound like a filesystem problem. Sounds more like the
>> > remote user/group configuration is getting squashed. Do the systems
>> > have the same user/group configurations, or are the clients sending
>> > group IDs the server doesn't recognise?
>>
>> Stracing shows that the group and user ID's are not being squashed and
>> they are resolving each time to their respective UID/GID's.
>>
>> > As it is, describing the problem in text doesn't tell me anything
>> > about the problem. You need to cut-n-paste the CLI and the output
>> > showing the incorrect behaviour so we can attempt to reproduce the
>> > same behaviour you are seeing.
>>
>> Busted.  I figured before sending the usual gamut of console "action",
>> I'd "save" time by simply presenting the symptoms.
>>
>> > I can't see how that is related to the filesystem - the filesystem
>> > will either account for group quota usage or it won't. It doesn't
>> > care what primary gid the process uses, it will simply account usage
>> > to that...
>>
>> You're correct (but you already knew this!).  I can tell you that
>> running the quota report does show the group block count changing.
>>
>> It looks like this "issue" is  my misunderstanding of how XFS is
>> checking the quota.  Perhaps you could shed some light?
>>
>> When you're using active user and group quotas on the same file system
>> and the user quota is lower than the group quota, does XFS first check
>> against the user quota and then the group quota?  Is the order of
>> operations user, group, and then project or does it depend on the
>> mounting order of quotas?
>
> Order doesn't matter because the filesystem is supposed to check
> against all enforced quotas, not just the first one.
>
>> In the case I presented yesterday, the user in question had a quota of
>> 25 GB, but the group had an unlimited quota.  Each time that I used
>> sudo -u user -g group or logged into the user's account, the quota was
>> always exceeded.  Now that I have removed the user's quota, the group
>> quota is now being respected properly.
>
> Again, you need to post the commands and output that demonstrate the
> problem you are describing. I'm having trouble understanding what
> your problem is because I can't see the raw output that you are
> seeing...
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-06-13 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 15:43 (Un)known issue with XFS group quotas on LVM? John Desantis
2014-06-11 23:07 ` Dave Chinner
2014-06-12 14:04   ` John Desantis
2014-06-13  0:01     ` Dave Chinner
2014-06-13 14:50       ` John Desantis [this message]
2014-06-13 16:22         ` Brian Foster
2014-06-13 17:00           ` John Desantis
2014-06-13 17:59             ` Brian Foster
2014-06-13 18:21               ` John Desantis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+Bg6weoSsNH=g7PJQfnafHk1TthCvzSQ9MRSsBWExyNhS1s9Q@mail.gmail.com' \
    --to=desantis@mail.usf.edu \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.