From: Dave Chinner <david@fromorbit.com>
To: Ian Macdonald <imac@gn.apc.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: Deleting a project from XFS quotas
Date: Wed, 23 May 2018 10:25:52 +1000 [thread overview]
Message-ID: <20180523002552.GY23861@dastard> (raw)
In-Reply-To: <d30e573b-9c2a-cf97-7608-ad10a7b1b21c@gn.apc.org>
On Tue, May 22, 2018 at 10:46:28AM +0200, Ian Macdonald wrote:
> Hi,
>
> We have been using XFS project quotas to track disk usage for various
> websites that we have on a server. The machine was running Debian jessie
> and this is what the quota report looked like:
> # xfs_quota -xc "report -h" /var
>
> Project quota on /var (/dev/xvda3)
> Blocks
> Project ID Used Soft Hard Warn/Grace
> ---------- ---------------------------------
> web01 74.3G 80G 81G 00 [------]
> web02 72.5G 75G 76G 00 [------]
> web03 18.5G 20G 21G 00 [------]
> web04 33.3G 40G 42G 00 [------]
> web05 10.3G 20G 21G 00 [------]
> web06 2.9G 20G 21G 00 [------]
>
> However, after upgrading the server to Debian stretch, that same report
> now looks like this:
Yup, newer kernels use a different (more efficient) mechanism for
iterating the known quotas. It's driven from the kernel side, so
it finds all initialised dquots in the quota file, not just those
that userspace has name mappings for.
> Project quota on /var (/dev/xvda3)
> Blocks
> Project ID Used Soft Hard Warn/Grace
> ---------- ---------------------------------
> #0 14.3G 0 0 00 [------]
> #15 0 20G 21G 00 [------]
> #32 0 20G 21G 00 [------]
> #33 0 20G 21G 00 [------]
> #34 0 20G 21G 00 [------]
> #35 0 20G 21G 00 [------]
> #36 0 20G 21G 00 [------]
> web01 86.5G 95G 96G 00 [------]
> web02 73.2G 75G 76G 00 [------]
> web03 19.5G 20G 21G 00 [------]
> web04 33.3G 40G 42G 00 [------]
> web05 10.3G 20G 21G 00 [------]
> web06 3.1G 20G 21G 00 [------]
>
> I only have the 'web01' to 'web06' projects listed in my /etc/projects
> and /etc/projid files, for the particular directories whose disk usage I
> want to manage via XFS quotas.
The quota file has dquots on disk for quota IDs 15, and 32-36 as
well as whatever you have assigned to web0[1-6]. Quota ID 0 is the
default project quota, telling you how much used space is not
assigned to other project quotas. What you are probably seeing is
old dquots from previously configured project IDs. They are still
allocated on disk, just empty now that nobody is using them.
I don't know if reporting these empty quota IDs is intentional or
what you need to do to avoid having them reported - someone involved
in changing the dquot iteration mechanism will have to chime in on
that....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-05-23 0:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 8:46 Deleting a project from XFS quotas Ian Macdonald
2018-05-23 0:25 ` Dave Chinner [this message]
2018-05-23 2:19 ` Eric Sandeen
2018-05-28 16:00 ` Ian Macdonald
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=20180523002552.GY23861@dastard \
--to=david@fromorbit.com \
--cc=imac@gn.apc.org \
--cc=linux-xfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox