public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* ENOSPC errors during raid1 rebalance
@ 2014-03-03 17:23 Mike Russo
  2014-03-03 18:16 ` Duncan
  2014-03-03 18:39 ` Hugo Mills
  0 siblings, 2 replies; 26+ messages in thread
From: Mike Russo @ 2014-03-03 17:23 UTC (permalink / raw)
  To: linux-btrfs@vger.kernel.org

Hi guys -
I'm trying to convert a disk from single (/dev/sdc1) to RAID1 (dev/sdd1), and the filesystem was previously ext4 but the conversion seemed to go just fine, and I have no snapshots. System and metadata convert, and almost all my data converts, but there are 70 stubborn GB (14 blocks of 5GB each) that refuse to convert and I get ENOSPC errors when trying to reallocate them.

Here's my vital stats: (on kernel 3.14-rc4):

root@ossy:/usr/src/btrfs-progs# /usr/src/btrfs-progs/btrfs fi show
Label: MyBook  uuid: c99cbefb-6a56-41e2-8f99-19f8b5f67884
        Total devices 2 FS bytes used 1.09TiB
        devid    1 size 1.82TiB used 1.12TiB path /dev/sdc1
        devid    2 size 1.82TiB used 1.05TiB path /dev/sdd1

Btrfs v3.12
root@ossy:/usr/src/btrfs-progs# /usr/src/btrfs-progs/btrfs fi df /mymedia
Data, RAID1: total=1.04TiB, used=1.03TiB
Data, single: total=70.00GiB, used=64.98GiB
System, RAID1: total=32.00MiB, used=160.00KiB
Metadata, RAID1: total=2.00GiB, used=1.33GiB


I've already done a -dusage=0 and -dusage=5 balance and that cleans up anything that gets left around when these 14 blocks fail get moved.    When mounting with enospc_debug I get messages like this for each block with the problem:


Mar  3 11:58:16 ossy kernel: [52724.423024] BTRFS: block group 935262683136 has 5368709120 bytes, 5321801728 used 0 pinned 0 reserved [readonly]
Mar  3 11:58:16 ossy kernel: [52724.423025] BTRFS info (device sdd1): block group has cluster?: no
Mar  3 11:58:16 ossy kernel: [52724.423026] BTRFS info (device sdd1): 0 blocks of free space at or bigger than bytes is
Mar  3 11:58:16 ossy kernel: [52724.423027] BTRFS: block group 942778875904 has 5368709120 bytes, 5309296640 used 0 pinned 0 reserved [readonly]
Mar  3 11:58:16 ossy kernel: [52724.423028] BTRFS info (device sdd1): block group has cluster?: no
Mar  3 11:58:16 ossy kernel: [52724.423029] BTRFS info (device sdd1): 0 blocks of free space at or bigger than bytes is

I don't have the space to reformat and if this is a genuine bug I'm sure you guys want to fix it too. What else can I do to resolve or help? 


Sincerely,

Michael Russo, Systems Engineer
PaperSolve, Inc.
268 Watchogue Road
Staten Island, NY 10314


^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: ENOSPC errors during raid1 rebalance
@ 2014-03-13 22:38 Eugene Crosser
  0 siblings, 0 replies; 26+ messages in thread
From: Eugene Crosser @ 2014-03-13 22:38 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]

Hello,

I want to report that I have the same problem as Michael Russo, except in my
case there is definitely *a lot* of free space.

I had ext4 on a 1Tb LVM mirror. The filesystem was 96% full, with many multi-Gb
files. I successfully converted it into btrfs, removed ext2_saved subvolume, but
did *not* defragment or balance.

Then I added two fresh 4Tb disks to the filesystem, and tried to convert it to
raid1. My plan was to then delete the original LVM disk and have all my data
migrated to the new 4Tb disks under btrfs mirror.

But balancing cannot complete with the same symptoms:

[...]
[12746.391828] block group has cluster?: no
[12746.391830] 0 blocks of free space at or bigger than bytes is
[12747.420098] btrfs: 35 enospc errors during balance

root@pccross:~# btrfs fi sh
Label: 'export'  uuid: 02f39e9d-9115-4a79-9015-a3a9decb87cf
	Total devices 3 FS bytes used 798.15GB
	devid    3 size 3.64TB used 855.03GB path /dev/sdd1
	devid    2 size 3.64TB used 855.00GB path /dev/sdc1
	devid    1 size 891.51GB used 175.48GB path /dev/md5

Btrfs v0.20-rc1

root@pccross:~# btrfs fi df /export
Data, RAID1: total=849.00GB, used=650.25GB
Data: total=175.48GB, used=145.64GB
System: total=32.00MB, used=136.00KB
Metadata, RAID1: total=6.00GB, used=2.21GB

root@pccross:~# uname -a
Linux pccross 3.13.0-17-generic #37-Ubuntu SMP Mon Mar 10 21:44:01 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux

Attempt "btrfs device delete" fails with the same "no space" diagnostic.

I am running defragmentation on all files bigger than 1Gb now, and see what
happens. If that does not help, is there any other advice? I can collect
debugging data if needed.

Thanks,

Eugene


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 547 bytes --]

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

end of thread, other threads:[~2014-03-13 22:49 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03 17:23 ENOSPC errors during raid1 rebalance Mike Russo
2014-03-03 18:16 ` Duncan
2014-03-03 18:24   ` Michael Russo
2014-03-03 18:48     ` Chris Murphy
2014-03-03 19:24       ` Michael Russo
2014-03-03 20:41         ` Chris Murphy
2014-03-03 20:50           ` Michael Russo
2014-03-03 21:02             ` Chris Murphy
2014-03-03 18:39 ` Hugo Mills
2014-03-04 15:55   ` Michael Russo
2014-03-04 17:29     ` Chris Murphy
2014-03-04 18:54       ` Michael Russo
2014-03-04 19:30         ` Chris Murphy
2014-03-05  0:27   ` Mike Russo
2014-03-05  3:32     ` Chris Murphy
2014-03-05 22:13       ` Michael Russo
2014-03-06  7:41         ` Duncan
2014-03-07  1:13           ` Michael Russo
2014-03-07  8:02             ` Hugo Mills
2014-03-07 10:18               ` Duncan
2014-03-07 14:17               ` Mike Russo
2014-03-08  1:46                 ` Mike Russo
2014-03-05  4:08     ` Chris Murphy
2014-03-05 22:13       ` Michael Russo
2014-03-06 17:07         ` Chris Murphy
  -- strict thread matches above, loose matches on Subject: below --
2014-03-13 22:38 Eugene Crosser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox