linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasco Visser <vasco.visser@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: understanding disk space usage
Date: Tue, 7 Feb 2017 17:44:02 +0100	[thread overview]
Message-ID: <CALg=eG_C-Xkw+TTHpNq9y_euza81TPTd+YN10_V=9WSprN0BPw@mail.gmail.com> (raw)

Hello,

My system is or seems to be running out of disk space but I can't find
out how or why. Might be a BTRFS peculiarity, hence posting on this
list. Most indicators seem to suggest I'm filling up, but I can't
trace the disk usage to files on the FS.

The issue is on my root filesystem on a 28GiB ssd partition (commands
below issued when booted into single user mode):


$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              28G   26G  2.1G  93% /


$ btrfs --version
btrfs-progs v4.4


$ btrfs fi usage /
Overall:
    Device size:  27.94GiB
    Device allocated:  27.94GiB
    Device unallocated:   1.00MiB
    Device missing:     0.00B
    Used:  25.03GiB
    Free (estimated):   2.37GiB (min: 2.37GiB)
    Data ratio:      1.00
    Metadata ratio:      1.00
    Global reserve: 256.00MiB (used: 0.00B)
Data,single: Size:26.69GiB, Used:24.32GiB
   /dev/sda3  26.69GiB
Metadata,single: Size:1.22GiB, Used:731.45MiB
   /dev/sda3   1.22GiB
System,single: Size:32.00MiB, Used:16.00KiB
   /dev/sda3  32.00MiB
Unallocated:
   /dev/sda3   1.00MiB


$ btrfs fi df /
Data, single: total=26.69GiB, used=24.32GiB
System, single: total=32.00MiB, used=16.00KiB
Metadata, single: total=1.22GiB, used=731.48MiB
GlobalReserve, single: total=256.00MiB, used=0.00B


However:
$ mount -o bind / /mnt
$ sudo du -hs /mnt
9.3G /mnt


Try to balance:
$ btrfs balance start /
ERROR: error during balancing '/': No space left on device


Am I really filling up? What can explain the huge discrepancy with the
output of du (no open file descriptors on deleted files can explain
this in single user mode) and the FS stats?

Any advice on possible causes and how to proceed?


--
Vasco

             reply	other threads:[~2017-02-07 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 16:44 Vasco Visser [this message]
2017-02-08  3:48 ` understanding disk space usage Qu Wenruo
2017-02-08  9:55   ` Vasco Visser
2017-02-09  2:53     ` Qu Wenruo
2017-02-09 12:01       ` Vasco Visser
2017-02-08 14:46   ` Peter Grandi
2017-02-08 17:50     ` Austin S. Hemmelgarn
2017-02-08 21:45       ` Peter Grandi
2017-02-09 12:47         ` Austin S. Hemmelgarn
2017-02-08 18:03     ` Hugo Mills
2017-02-09 13:25   ` Adam Borowski
2017-02-09 17:53     ` 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='CALg=eG_C-Xkw+TTHpNq9y_euza81TPTd+YN10_V=9WSprN0BPw@mail.gmail.com' \
    --to=vasco.visser@gmail.com \
    --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).