The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,053 other followers

btrfs free space. It’s complicated. Still.

Posted by jpluimers on 2018/07/09

Everytime a btrfs based volume runs out of space, I’m reminded of these:

There are a few scripts that help you assess quota usage. If you think they are wrong, then you need to btrfs quota rescan / which tells you that it started, but won’t tell when it’s finished (nor wil journalctl -xe a.k.a. journalctl --catalog --pager-end), but dmesg does:

# dmesg | grep qgroup
[ 316.608122] BTRFS info (device sda2): qgroup scan completed (inconsistency flag cleared)

For now I’ve this quick script to start investigation:

~/Versioned/btrfs-du/btrfs-du && df -h | grep "\/$\|^[^\/]" && btrfs quota rescan -s /

It assumes there is quota on the root (enable with btrfs quota enable /) and is based on my fork The df will limit itself to the root (trailing / matched by \/$) or disks not mounted from / (matched by ^[^\/]).


References (not solutions):

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: