Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs-convert aborted #312

Open
jonashaag opened this issue Nov 17, 2020 · 6 comments
Open

btrfs-convert aborted #312

jonashaag opened this issue Nov 17, 2020 · 6 comments
Labels
bug convert Changes in btrfs-convert

Comments

@jonashaag
Copy link

This is with btrfs-progs master

$ sudo ./btrfs-convert /dev/sdc1
create btrfs filesystem:
	blocksize: 4096
	nodesize:  16384
	features:  extref, skinny-metadata (default)
	checksum:  crc32c
free space report:
	total:     417914159104
	free:      101515264 (0.02%)
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
kernel-shared/ctree.c:2375: split_leaf: BUG_ON `1` triggered, value 1
./btrfs-convert(+0x29cac)[0x5578d3e9fcac]
./btrfs-convert(+0x2dce3)[0x5578d3ea3ce3]
./btrfs-convert(btrfs_search_slot+0x11d5)[0x5578d3ea57f4]
./btrfs-convert(btrfs_csum_file_block+0x42b)[0x5578d3ec2564]
./btrfs-convert(+0xdf52)[0x5578d3e83f52]
./btrfs-convert(main+0x1cd4)[0x5578d3e86120]
/usr/lib/libc.so.6(__libc_start_main+0xf2)[0x7f738f4d1152]
./btrfs-convert(_start+0x2e)[0x5578d3e83a8e]
Aborted
@adam900710
Copy link
Contributor

adam900710 commented Nov 18, 2020

free space report:
	total:     417914159104
	free:      101515264 (0.02%)

Isn't this already showing the problem?

You only have around 100MiB For metadata.

Considering how many data you have already, 400+G, just for csum you will need at least 400+MiB space.

No wonder btrfs_search_slot() fails with -ENOSPC

@jonashaag
Copy link
Author

jonashaag commented Nov 18, 2020

Fair enough, I just reported this because the traceback said BUG. If there isn’t anything to fix here maybe at least the error message could be improved.

@jonashaag
Copy link
Author

Also, according to df, I’ve had a lot more space left. Could it be that there was some space used by an earlier conversion attempt (that failed due to a bug in v5.4)?

@adam900710
Copy link
Contributor

For the BUG_ON we definitely need to make it more graceful.

The space reported by ext* is not directly usable for btrfs.
The space btrfs can utilize for its metadata is just a subset of the free space.

One of the main reason of greatly reduced usable space is fragmentation.

Btrfs needs somewhat contig free space for its new chunks, thus if your fs has a lot of free space, but very fragmented, then you can see the result.

Previously convert attempt won't cause anything different.

@kdave kdave added the bug label Dec 1, 2020
@cmurf
Copy link

cmurf commented Feb 19, 2021

Downstream bug with btrfs-progs 5.10.

@kdave kdave added the convert Changes in btrfs-convert label Feb 24, 2021
@tomchiverton
Copy link

Kernel bug report with v6.2

https://bugzilla.kernel.org/show_bug.cgi?id=203693

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug convert Changes in btrfs-convert
Projects
None yet
Development

No branches or pull requests

5 participants