Linux-BTRFS Archive mirror
 help / color / mirror / Atom feed
From: O'Brien Dave <odaiwai@gmail.com>
To: quwenruo.btrfs@gmx.com
Cc: linux-btrfs@vger.kernel.org
Subject: Re: BTRFS w/ quotas hangs on read-write mount using all available RAM - rev2
Date: Tue, 7 May 2024 21:43:50 +0800	[thread overview]
Message-ID: <65E2F681-67F5-4AC2-823B-3C6CBE22E891@gmail.com> (raw)

> So the only way to get rid of the situation is using the newer sysfs
> interface "/sys/fs/btrfs/<uuid>/qgroups/drop_subtree_treshold”.
>
> Some lower value like 2 or 3 would be good enough to address the
> situation, which would automatically change qgroup to inconsistent if a
> larger enough subtree is dropped.

Setting the threshold to 2 or 3 didn't work - the machine ran until OOM failure in both cases - but what did work was setting it to 1 or 0. (I’m not sure which fixed it, as I set it to 1, then 0, there was a flurry of disk activity and the qgroups were immediately marked as inconsistent.)

So, after rebooting into single user mode with /home in ro:

$ vim /etc/fstab # to change /home back to the defaults
$ mount /home
$ echo "0" >/sys/fs/btrfs/<UUID>/qgroups/drop_subtree_threshold
$ cat/sys/fs/btrfs/<UUID>/qgroups/drop_subtree_threshold  # to check
$ btrfs qgroup show -pcre /home
$ btrfs quota disable /home

Thanks for your help!

             reply	other threads:[~2024-05-07 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 13:43 O'Brien Dave [this message]
2024-05-07 20:44 ` BTRFS w/ quotas hangs on read-write mount using all available RAM - rev2 Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
2024-05-05  3:55 O'Brien Dave
2024-05-05  6:09 ` Qu Wenruo
2022-10-09 11:03 admiral
2022-10-09 11:13 ` Qu Wenruo
2022-10-09 11:37   ` Qu Wenruo
2022-10-10 21:55     ` admiral

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=65E2F681-67F5-4AC2-823B-3C6CBE22E891@gmail.com \
    --to=odaiwai@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).