On Wed, Nov 12, 2014 at 06:48:47PM +0000, Kline, Matthew wrote:
> 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.

   I'm fairly sure it's a bug. We've had several reports of something
like this, particularly with respect to converted filesystems. I know
that failed balances with apparently plenty of space are reasonably
high up on josef's list of things to investigate. I would recommend at
minimum putting this report on bugzilla.kernel.org as well. The other
thing you could do, which may help with debugging, is to take a copy
of the metadata:

$ btrfs-image -c9 -t4 /dev/sdb1 /path/to/image.img

and hang on to it just in case josef (or whoever else looks at it)
needs another sample to debug with.

> Is there something I'm missing?

   I don't think so. This is probably a bug -- I'd guess in the FS
(because we've seen something similar on non-converted FSes), but
maybe set up more easily by the conversion process.

   Hugo.

> 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

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
                       --- Strive for apathy! ---                        

Attachment: signature.asc
Description: Digital signature

Reply via email to