* Deleting a project from XFS quotas
@ 2018-05-22 8:46 Ian Macdonald
2018-05-23 0:25 ` Dave Chinner
0 siblings, 1 reply; 4+ messages in thread
From: Ian Macdonald @ 2018-05-22 8:46 UTC (permalink / raw)
To: linux-xfs
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:
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.
Does anyone have any idea why I'm seeing these extra projects listed
after the upgrade to stretch? What can I do to remove them so that I'm
only setting quotas and doing file accounting for the six web
directories that I've configured?
Thanks in advance for any help you are able to give me.
Best wishes,
-Ian Macdonald
--
Ian Macdonald
GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
UK Tel: 0330 355 4011
Intl: +44 20 7065 0935
Twitter: @GreenNetISP
Registered in England & Wales, Company No. 02070438
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Deleting a project from XFS quotas
2018-05-22 8:46 Deleting a project from XFS quotas Ian Macdonald
@ 2018-05-23 0:25 ` Dave Chinner
2018-05-23 2:19 ` Eric Sandeen
0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2018-05-23 0:25 UTC (permalink / raw)
To: Ian Macdonald; +Cc: linux-xfs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Deleting a project from XFS quotas
2018-05-23 0:25 ` Dave Chinner
@ 2018-05-23 2:19 ` Eric Sandeen
2018-05-28 16:00 ` Ian Macdonald
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2018-05-23 2:19 UTC (permalink / raw)
To: Dave Chinner, Ian Macdonald; +Cc: linux-xfs
On 5/22/18 7:25 PM, Dave Chinner wrote:
> On Tue, May 22, 2018 at 10:46:28AM +0200, Ian Macdonald wrote:
...
> 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....
<someone chimes in>
If a quota exists on disk with a limit, it should be shown
even if it doesn't happen to be in the projects file; in fact the
projects(5) man page says the file itself is optional.
And Ian's quotas weren't exactly empty, they were actual quotas with
limits set, even if there was no current usage under that ID.
So I think it makes sense to show them (we would have if they were
in /etc/projects, right?)
Anyway, if you have a quota showing up for an ID that's not in
the projects file:
# xfs_quota -x -c 'limit -p bhard=1g 42' /mnt/test
# xfs_quota -x -c report /mnt/test
Project quota on /mnt/test (/dev/pmem0p1)
Blocks
Project ID Used Soft Hard Warn/Grace
---------- --------------------------------------------------
#0 0 0 0 00 [--------]
#42 0 0 1048576 00 [--------]
You can make it disappear by setting its limits to zero:
# xfs_quota -x -c 'limit -p bhard=0 42' /mnt/test
# xfs_quota -x -c report /mnt/test
Project quota on /mnt/test (/dev/pmem0p1)
Blocks
Project ID Used Soft Hard Warn/Grace
---------- --------------------------------------------------
#0 0 0 0 00 [--------]
-Eric
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Deleting a project from XFS quotas
2018-05-23 2:19 ` Eric Sandeen
@ 2018-05-28 16:00 ` Ian Macdonald
0 siblings, 0 replies; 4+ messages in thread
From: Ian Macdonald @ 2018-05-28 16:00 UTC (permalink / raw)
To: Eric Sandeen, Dave Chinner; +Cc: linux-xfs
[-- Attachment #1.1: Type: text/plain, Size: 1747 bytes --]
Hi Dave, Eric,
On 23/05/18 04:19, Eric Sandeen wrote:
> On 5/22/18 7:25 PM, Dave Chinner wrote:
>> On Tue, May 22, 2018 at 10:46:28AM +0200, Ian Macdonald wrote:
>
> ...
>
>
>> 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....
>
> <someone chimes in>
>
> If a quota exists on disk with a limit, it should be shown
> even if it doesn't happen to be in the projects file; in fact the
> projects(5) man page says the file itself is optional.
>
> And Ian's quotas weren't exactly empty, they were actual quotas with
> limits set, even if there was no current usage under that ID.
> So I think it makes sense to show them (we would have if they were
> in /etc/projects, right?)
OK, that makes sense. Those extra projects were not displayed in the
quota report under Debian jessie, which led to my confusion.
> Anyway, if you have a quota showing up for an ID that's not in
> the projects file:
>
> ...
>
> You can make it disappear by setting its limits to zero:
>
> # xfs_quota -x -c 'limit -p bhard=0 42' /mnt/test
> # xfs_quota -x -c report /mnt/test
> Project quota on /mnt/test (/dev/pmem0p1)
I see, that has worked.
Many thanks for the help.
Best,
-Ian
--
Ian Macdonald
GPG/PGP: 0778 889F EE5D DFB4 D195 97A7 779B D6BF A305 DEFC
XMPP/OTR: imac@gn.apc.org Wire.com: @idmacdonald
GreenNet Ltd, 56-64 Leonard Street, London EC2A 4LT
UK Tel: 0330 355 4011
Intl: +44 20 7065 0935
My desk: +44 20 3559 4011
Twitter: @GreenNetISP
Registered in England & Wales, Company No. 02070438
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-28 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-22 8:46 Deleting a project from XFS quotas Ian Macdonald
2018-05-23 0:25 ` Dave Chinner
2018-05-23 2:19 ` Eric Sandeen
2018-05-28 16:00 ` Ian Macdonald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox