From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Qgroups are not applied when snapshotting a subvol?
Date: Sun, 26 Mar 2017 05:45:02 +0000 (UTC) [thread overview]
Message-ID: <pan$18202$be55fb99$f080cada$e9c008d5@cox.net> (raw)
In-Reply-To: 4428fdc3-157a-a98e-8ca3-e3701c6c1c80@sichert.me
Moritz Sichert posted on Sat, 25 Mar 2017 23:03:26 +0100 as excerpted:
> I tried to configure qgroups on a btrfs filesystem but was really
> surprised that when you snapshot a subvolume, the snapshot will not be
> assigned to the qgroup the subvolume was in.
> I feel like I must be missing something here. Considering that creating
> a snapshot does not require root privileges this would mean that any
> user can just circumvent any quota and therefore make them useless.
>
> Is there a way to enforce quotas even when a user creates snapshots?
This doesn't answer your question, but rather is general information you
should know about btrfs quotas, that I saw no hint in your post that
you're already aware of.
Btrfs' quota functionality has a long history of breakage, and if it's
actually working properly now, it's only very recently so. Don't rely on
the btrfs quota functionality working correctly or being stable, tho
certainly, developers are working very hard at making it eventually so.
Meanwhile, even if it is working correctly, btrfs quota functionality has
serious scaling issues that can seriously slow the progress of btrfs
maintenance commands such as balance and check to a crawl, making them
practically unworkable as they may take weeks to finish on today's
terabyte-scale filesystems -- declaring the filesystem dead, doing a
fresh mkfs, and restoring from backups can be far faster. These commands
are already slow and memory hungry, and having to deal with quotas makes
things far worse.
So basically you and your btrfs quota use-case fall into one of three
classes:
1) You know about the issues and are working with the devs to test and
fix them, helping to make btrfs qgroups and quotas to one day be fully
reliable and scalable. =:^)
If this matches your situation, THANKS! =:^)
Unfortunately, your post had more of the tone of btrfs quota newbie than
someone that knew about the situation, which means you're more likely to
fall into one of the two classes below.
2) Your use-case really needs and relies on quotas to function stably and
reliably.
Unfortunately, if you're in this class, btrfs is not at this time ready
for you -- you're better off on a more mature and fully stable filesystem
that has a reliable quota feature.
3) Your use-case doesn't rely on quotas and you simply believed they were
a nice "extra" feature you could play with.
In this case the best recommendation is to turn the feature off and leave
it off until such time as the quota feature is considered generally
stable and can be recommended, for me personally, several kernel cycles
after things on the quota front seem to have quieted down and it appears
to have been working without major problems.
Even then, quotas are likely to come at somewhat of a scalability and
performance cost, however, which may or may not be worth it, depending on
what the feature can do for your use-case.
(FWIW, the otherwise stable snapshots feature also has scalability
issues. That's why the strong recommendation is to keep them thinned
down to 1-300 per snapshotted subvolume, under 200 if reasonably
possible, and under 2000 per filesystem, under 1000 if possible. But at
least that feature is stable and the scalability cost arguably well
justified by the benefits if the numbers are managed well.
Unfortunately, the same thing can't presently be said about qgroups and
quotas.)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2017-03-26 5:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-25 22:03 Qgroups are not applied when snapshotting a subvol? Moritz Sichert
2017-03-26 5:45 ` Duncan [this message]
2017-03-27 0:39 ` Qu Wenruo
2017-03-27 3:26 ` Andrei Borzenkov
2017-03-27 3:46 ` Qu Wenruo
2017-03-27 11:02 ` Moritz Sichert
2017-03-27 12:01 ` Austin S. Hemmelgarn
2017-03-27 19:32 ` Chris Murphy
2017-03-27 19:53 ` Roman Mamedov
2017-03-27 20:06 ` Hans van Kranenburg
2017-03-27 21:11 ` Chris Murphy
2017-03-28 2:41 ` Duncan
2017-03-28 5:21 ` Duncan
2017-03-28 3:56 ` Andrei Borzenkov
2017-03-28 11:24 ` Austin S. Hemmelgarn
2017-03-28 12:00 ` Marat Khalili
2017-03-28 12:20 ` Austin S. Hemmelgarn
2017-03-28 13:53 ` Marat Khalili
2017-03-28 15:24 ` Austin S. Hemmelgarn
2017-03-29 5:53 ` Marat Khalili
2017-03-28 1:49 ` Qu Wenruo
2017-03-28 11:44 ` Austin S. Hemmelgarn
2017-03-29 5:38 ` Duncan
2017-03-29 11:36 ` Austin S. Hemmelgarn
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='pan$18202$be55fb99$f080cada$e9c008d5@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).