Skip to contentSkip to conversation

btrfs-progs: btrfs-convert: unable to find block group for 0

DISCUSSION Tucker Boniface 3 participants 5 messages Aug 28, 2018 – Sep 11, 2018 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello, I am trying to convert an ext4 partition to btrfs using btrfs-convert. I am running Arch Linux with kernel 4.18.5 and btrfs-progs 4.17.1. The full error is inline below.

-> # btrfs-convert /dev/sda1 create btrfs filesystem:

	blocksize: 4096
	nodesize:  16384
	features:  extref, skinny-metadata (default)

creating ext2 image file
Unable to find block group for 0
Unable to find block group for 0
Unable to find block group for 0
extent-tree.c:2743: alloc_tree_block: BUG_ON ret triggered, value -28 btrfs-convert(+0x1d512)[0x564d08cd3512] btrfs-convert(btrfs_alloc_free_block+0x1e8)[0x564d08cda188] btrfs-convert(+0x15bd1)[0x564d08ccbbd1] btrfs-convert(btrfs_search_slot+0xf27)[0x564d08ccd7d7] btrfs-convert(btrfs_csum_file_block+0x499)[0x564d08cdf219] btrfs-convert(+0xe625)[0x564d08cc4625] btrfs-convert(main+0x1abf)[0x564d08cc3adf] /usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7f1822576223] btrfs-convert(_start+0x2e)[0x564d08cc41be]
Aborted

#1 lore raw
Quoted 4 lines · Tucker Boniface

Hello, I am trying to convert an ext4 partition to btrfs using btrfs-convert. I am running Arch Linux with kernel 4.18.5 and btrfs-progs 4.17.1. The full error is inline below.

Quoted 10 lines

-> # btrfs-convert /dev/sda1
create btrfs filesystem:
    blocksize: 4096
    nodesize:  16384
    features:  extref, skinny-metadata (default)
creating ext2 image file
Unable to find block group for 0
Unable to find block group for 0
Unable to find block group for 0
extent-tree.c:2743: alloc_tree_block: BUG_ON ret triggered, value -28

This means ENOSPC.
Your ext* doesn't have enough free space to contain btrfs' metadata.

Thanks,
Qu

Quoted 10 lines

btrfs-convert(+0x1d512)[0x564d08cd3512] btrfs-convert(btrfs_alloc_free_block+0x1e8)[0x564d08cda188] btrfs-convert(+0x15bd1)[0x564d08ccbbd1] btrfs-convert(btrfs_search_slot+0xf27)[0x564d08ccd7d7] btrfs-convert(btrfs_csum_file_block+0x499)[0x564d08cdf219] btrfs-convert(+0xe625)[0x564d08cc4625] btrfs-convert(main+0x1abf)[0x564d08cc3adf] /usr/lib/libc.so.6(__libc_start_main+0xf3)[0x7f1822576223] btrfs-convert(_start+0x2e)[0x564d08cc41be]
Aborted

#2 lore raw
Quoted 18 lines · Qu Wenruo
Quoted 4 lines · Tucker Boniface

Hello, I am trying to convert an ext4 partition to btrfs using btrfs-convert. I am running Arch Linux with kernel 4.18.5 and btrfs-progs 4.17.1. The full error is inline below.

Quoted 10 lines

-> # btrfs-convert /dev/sda1
create btrfs filesystem:
    blocksize: 4096
    nodesize:  16384
    features:  extref, skinny-metadata (default)
creating ext2 image file
Unable to find block group for 0
Unable to find block group for 0
Unable to find block group for 0
extent-tree.c:2743: alloc_tree_block: BUG_ON ret triggered, value -28

Quoted 2 lines

This means ENOSPC.
Your ext* doesn't have enough free space to contain btrfs' metadata.

Can we do something better than a crash? The BUG_ON is in alloc_tree_block, there's only one caller btrfs_alloc_free_block that handles errors, so it should be straightforward to fix.

#3 lore raw
Quoted 19 lines · David Sterba
Quoted 18 lines · Qu Wenruo
Quoted 14 lines · Tucker Boniface

Hello, I am trying to convert an ext4 partition to btrfs using btrfs-convert. I am running Arch Linux with kernel 4.18.5 and btrfs-progs 4.17.1. The full error is inline below.

-> # btrfs-convert /dev/sda1
create btrfs filesystem:
    blocksize: 4096
    nodesize:  16384
    features:  extref, skinny-metadata (default)
creating ext2 image file
Unable to find block group for 0
Unable to find block group for 0
Unable to find block group for 0
extent-tree.c:2743: alloc_tree_block: BUG_ON ret triggered, value -28

Quoted 7 lines
Quoted 2 lines

This means ENOSPC.
Your ext* doesn't have enough free space to contain btrfs' metadata.

Can we do something better than a crash? The BUG_ON is in alloc_tree_block, there's only one caller btrfs_alloc_free_block that handles errors, so it should be straightforward to fix.

Already submitted: (about one month ago)

https://patchwork.kernel.org/patch/10554575/

Thanks,
Qu

#4 lore raw
Quoted 25 lines · Qu Wenruo
Quoted 22 lines · David Sterba
Quoted 20 lines · Qu Wenruo
Quoted 4 lines · Tucker Boniface

Hello, I am trying to convert an ext4 partition to btrfs using btrfs-convert. I am running Arch Linux with kernel 4.18.5 and btrfs-progs 4.17.1. The full error is inline below.

Quoted 10 lines

-> # btrfs-convert /dev/sda1
create btrfs filesystem:
    blocksize: 4096
    nodesize:  16384
    features:  extref, skinny-metadata (default)
creating ext2 image file
Unable to find block group for 0
Unable to find block group for 0
Unable to find block group for 0
extent-tree.c:2743: alloc_tree_block: BUG_ON ret triggered, value -28

This means ENOSPC.
Your ext* doesn't have enough free space to contain btrfs' metadata.

Quoted 7 lines
Quoted 4 lines

Can we do something better than a crash? The BUG_ON is in alloc_tree_block, there's only one caller btrfs_alloc_free_block that handles errors, so it should be straightforward to fix.

Already submitted: (about one month ago)

https://patchwork.kernel.org/patch/10554575/

Yeah, thanks. I noticed the patch later on. Now in devel.