-
Notifications
You must be signed in to change notification settings - Fork 248
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
Comments
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 |
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. |
Also, according to |
For the The space reported by ext* is not directly usable for btrfs. 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. |
Downstream bug with btrfs-progs 5.10. |
Kernel bug report with v6.2 |
Hello, (in which kernel) is this bug fixed? Is it the btrfs-progs or the kernel, that I need to update? best regards, |
It's pure btrfs-progs. Kernel is not involved. Please check the free space first. If there is not enough free space, btrfs-convert will fail no matter which version. |
Hello, thanks.
But df reports 510 GB out of 4.5TB free. Apart from that: Should btrfs-convert not give a warning in cases where the space may be insufficient and abort if it is sure that the space is insufficient (i.e. if there is not enough space for the csums) |
Btrfs-convert reports different number because the original fs is fragmented. Btrfs needs to reserve contiguous space for its metadata, thus heavily fragmented ext4 is not a good start. The BUG_ON() will be removed soon, since callers can handle the error gracefully. |
Hello, so, best to defragment the original fs?
Yes, but that error may come after 10 hours. It is preferable to know before, that the conversion may fail due to lack of space. Greetings, |
It's a little hard to estimate. Just shown in your case, although the percentage is very low 0.02%, but the number itself is still pretty high (almost 2G). It may be enough to contain the metadata or may not. Your case is already at the boundary, in fact if you disable data checksum during conversion, it may even succeed. The free space management of btrfs is already too complex even for non-converted fs, I'm afraid we can either cause too many false alerts (where the convert can succeed but still warns) or can only know the result until tried. |
ok. You are the expert :-) if I disable data checksum during conversion, (how) can I enable it later? |
Defragging ext4 may help, but I'm not sure how helpful it can really be. For the csum part, if you disable it (and conversion succeeded), you will hit a very hard situation where you have to delete the ext4 image first (aka, no way to rollback), then delete tons of files to release enough space. So if you care about data checksum, then do not bother to disable that in the first place, and delete as many files possible in the ext4 first. |
This involves the following error cases: - Unable to find the original item Return -EAGAIN and release the path (which is not done in the original code) - Error from split_leaf() Remove the BUG_ON() and handle the error. The most common error is ENOSPC. - Error from kmalloc() Just handle the error and return -ENOMEM. Issue: kdave#312 Signed-off-by: Qu Wenruo <[email protected]>
This involves the following error cases: - Unable to find the original item Return -EAGAIN and release the path (which is not done in the original code) - Error from split_leaf() Remove the BUG_ON() and handle the error. The most common error is ENOSPC. - Error from kmalloc() Just handle the error and return -ENOMEM. Issue: #312 Signed-off-by: Qu Wenruo <[email protected]>
This involves the following error cases: - Unable to find the original item Return -EAGAIN and release the path (which is not done in the original code) - Error from split_leaf() Remove the BUG_ON() and handle the error. The most common error is ENOSPC. - Error from kmalloc() Just handle the error and return -ENOMEM. Issue: #312 Signed-off-by: Qu Wenruo <[email protected]>
This involves the following error cases: - Unable to find the original item Return -EAGAIN and release the path (which is not done in the original code) - Error from split_leaf() Remove the BUG_ON() and handle the error. The most common error is ENOSPC. - Error from kmalloc() Just handle the error and return -ENOMEM. Issue: #312 Signed-off-by: Qu Wenruo <[email protected]>
This involves the following error cases: - Unable to find the original item Return -EAGAIN and release the path (which is not done in the original code) - Error from split_leaf() Remove the BUG_ON() and handle the error. The most common error is ENOSPC. - Error from kmalloc() Just handle the error and return -ENOMEM. Issue: #312 Signed-off-by: Qu Wenruo <[email protected]>
This is with btrfs-progs master
The text was updated successfully, but these errors were encountered: