linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* btrfs balance fails with no space errors (despite having plenty)
@ 2014-11-12 18:48 Kline, Matthew
  2014-11-13  0:06 ` Oon-Ee Ng
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kline, Matthew @ 2014-11-12 18:48 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

Hi all,

Yesterday I converted my ext4 root and home partitions on my home machine
to btrfs using btrfs-convert. After confirming that everything went well,
I followed the wiki instructions to nuke the 'ext2_saved" subvolume,
then defraggad and rebalanced. Everything went according to plan on my root
partition, but my home partition claimed to have run out of space
when rebalancing.

I did some digging and tried the following to resolve the problem,
but to no avail. So far I have:

- Made sure I deleted the subvolume (a common cause of this problem).
  `sudo btrfs subvolume list -a /home` exits with no output.

- Made sure I defragged the newly converted btrfs partition before attempting
  to rebalance it.

- Made sure that I actually have space on the partition.
  It is only about 60% full - see sdb1 below:

  ~ % sudo btrfs fi show
  Label: none  uuid: 3a154348-9bd4-4c3f-aaf8-e9446d3797db
      Total devices 1 FS bytes used 9.49GiB
      devid    1 size 87.47GiB used 11.03GiB path /dev/sda3

  Label: none  uuid: cc90ee50-bbda-46d6-a7e6-fe1c8578d75b
      Total devices 1 FS bytes used 124.98GiB
      devid    1 size 200.00GiB used 127.03GiB path /dev/sdb1

- Made sure I have metadata space (as suggested on the problem FAQ):

  ~ % sudo btrfs fi df /home
  Data, single: total=126.00GiB, used=124.58GiB
  System, single: total=32.00MiB, used=20.00KiB
  Metadata, single: total=1.00GiB, used=404.27MiB
  GlobalReserve, single: total=136.00MiB, used=0.00B

- Ran partial rebalances using the `-dusage` flag
  (as suggested on the problem FAQ),
  which successfully balanced a handful of blocks.

- Checked the system log - nothing interesting comes up.
  btrfs happily chugs along with "found xxx extents" and
  "relocating block group xxxxx flags 1" messages before unceremoniously
  ending with "7 enospc errors during balance".

In spite of all of this, a full rebalance still fails when it's about 95% done.
I'm at a complete loss as to what could be causing it - I know that it's not
completely necessary (especially with a single drive),
and `btrfs scrub` finds no errors with the file system,
but the wiki gives the impression that it's a good idea after you convert from
ext.

Is there something I'm missing?

Best,
Matt Kline

Other obligatory info: I'm on Arch Linux using btrfs 3.17.1. uname -a is

Linux kline-arch 3.17.2-1-ARCH #1 SMP PREEMPT Thu Oct 30 20:49:39 CET 2014
x86_64 GNU/Linux

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: btrfs balance fails with no space errors (despite having plenty)
@ 2015-03-24 22:25 Kline, Matthew
  2015-03-24 23:03 ` Roman Mamedov
  0 siblings, 1 reply; 11+ messages in thread
From: Kline, Matthew @ 2015-03-24 22:25 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

Sorry to necrobump this, but the issue came up again.
I'm now on Linux 3.19.2 with btrfs-progs 3.19, and I converted my work laptop
from ext4 to btrfs. Same issue - the conversion goes well,
removing the ext* subvolume is fine, defragging is works,
and then when I balance, it claims there is no space left on the device
when the drive is 35% full. Dmesg is useless once again,
giving only "1 enospc errors during balance".

The last time this was an issue (the original post in this thread),
I ended up just copying everything to an external drive,
reformatting the btrfs partition, and copying things back.

This time I did what was suggested below (moving all +1GB files off-drive
to tmpfs and then back on) in case defrag missed something, and balance
still fails. I was sure to rename the files and sync as suggested.

Is there a known bug still lurking in ext4 conversion?

Duncan <1i5t5.duncan <at> cox.net> writes:

> Either way, assuming it's the super-extent problem which I
> think it is, other than trying a defrag again, one way to
> for sure solve that problem is to make a list of all your
> over 1 GiB files, and move them out of the filesystem and
> then back in, so they get recreated in native btrfs format.
> 
> If moving all > 1 GiB files off of the filesystem and
> then back on, thus recreating them in native btrfs format,
> doesn't help, then either you missed one and it's still
> triggering the issue, or there's something else going
> on.
> 



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-03-25  3:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 18:48 btrfs balance fails with no space errors (despite having plenty) Kline, Matthew
2014-11-13  0:06 ` Oon-Ee Ng
2014-11-13  7:36 ` Duncan
2014-11-13 10:38 ` Hugo Mills
  -- strict thread matches above, loose matches on Subject: below --
2015-03-24 22:25 Kline, Matthew
2015-03-24 23:03 ` Roman Mamedov
2015-03-24 23:09   ` Kline, Matthew
2015-03-24 23:14     ` Hugo Mills
2015-03-24 23:45       ` Kline, Matthew
2015-03-25  3:39       ` Russell Coker
2015-03-24 23:31     ` Roman Mamedov

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).