All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <russell@coker.com.au>, BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: snapshot space use
Date: Thu, 9 Apr 2015 08:45:21 +0800	[thread overview]
Message-ID: <5525CBA1.5000408@cn.fujitsu.com> (raw)
In-Reply-To: <201504091039.33442.russell@coker.com.au>

Hi,

You can use btrfs quota feature to do it.
Like this:

# btrfs quota enable <MNT_POINT>
# btrfs quota rescan -w <MNT_POINT>
# btrfs qgroup show -prce <MNT_POINT>
qgroupid rfer    excl    max_rfer max_excl parent  child
-------- ----    ----    -------- -------- ------  -----
0/5      2248704 12288   0        0        ---     ---
0/256    5509120 3272704 0        0        ---     ---


rfer is all the space the subvolume takes.
excl is the exclusive space the subvolume takes.

You can also refer to 'btrfs-quota'(8) and 'btrfs-qgroup'(8),
Also the following wiki can help:
https://btrfs.wiki.kernel.org/index.php/Quota_support

NOTE: quota is not so stable and has some problem, but should give
you enough info.

Thanks,
Qu

> # zfs list -t snapshot
> NAME                        USED  AVAIL  REFER  MOUNTPOINT
> hetz0/be0-mail@2015-03-10  2.88G      -   387G  -
> hetz0/be0-mail@2015-03-11  1.12G      -   388G  -
> hetz0/be0-mail@2015-03-12  1.11G      -   388G  -
> hetz0/be0-mail@2015-03-13  1.19G      -   388G  -
> hetz0/be0-mail@2015-03-14  1.02G      -   388G  -
> hetz0/be0-mail@2015-03-15   989M      -   386G  -
>
> Is there any way to do something similar to the above ZFS command?  It's handy
> to know which snapshots are taking up the most space, especially when multiple
> subvols are being snapshotted.
>

  reply	other threads:[~2015-04-09  0:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  0:39 snapshot space use Russell Coker
2015-04-09  0:45 ` Qu Wenruo [this message]
2015-04-09  9:02   ` Piotr Szymaniak
2015-04-09  9:26     ` Qu Wenruo
2015-04-09 22:01   ` Justin Maggard
2015-04-09 22:24     ` Hugo Mills
2015-04-09 23:27       ` Justin Maggard
2015-04-09 23:39         ` Hugo Mills
2015-04-10  0:32           ` Dongsheng Yang
2015-04-10  0:40             ` Justin Maggard
2015-04-10  0:48               ` Qu Wenruo
2015-04-10  7:55 ` Russell Coker

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=5525CBA1.5000408@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=russell@coker.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.