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

May need to add a check for btrfs volume mbsize #2210

Closed
FzCola opened this issue Nov 23, 2022 · 5 comments
Closed

May need to add a check for btrfs volume mbsize #2210

FzCola opened this issue Nov 23, 2022 · 5 comments

Comments

@FzCola
Copy link

FzCola commented Nov 23, 2022

Given filesystem="btrfs" with preferlvm="true" and "oem-resize" is true by default.
The creation of the subvolume /var is reporting the following error during the build process:
DEBUG: 08:43:49 | EXEC: [mkfs.btrfs /dev/vgSystem/LVVar]
DEBUG: 08:43:49 | EXEC: Failed with stderr: ERROR: '/dev/vgSystem/LVVar' is too small to make a usable filesystem
ERROR: minimum size for each btrfs device is 114294784
, stdout: btrfs-progs v5.16.2

The calculated mbsize for /var is 66M, which is small than the minimum size required by btrfs.
Maybe need to add a check to ensure the mbsize returned from get_volume_mbsize in base.py is large enough for "btrfs" filesystem.

@FzCola
Copy link
Author

FzCola commented Nov 23, 2022

I temporarily add
if filesystem_name =='btrfs' and mbsize < 109: mbsize = 109
as a workaround before the return of get_volume_mbsize() in my local usr/lib/python3.6/site-packages/kiwi/volume_manager/base.py and It works.

@davidcassany
Copy link
Collaborator

Interesting I believe this is a duplicate of #1835

yes with oem-resize btrfs and lvm volumes this issue may raise if there is no data in the volume. Would it be a reasonable workaround adding some extra file to reach the minimum size btrfs requires?

On the other hand, just out of curiosity, is there any reason to use btrfs together with LVM volumes? The common approach is just using btrfs subvolumes, I know it is not the same but for many use cases they just work the same.

@FzCola
Copy link
Author

FzCola commented Nov 23, 2022

Interesting I believe this is a duplicate of #1835

yes with oem-resize btrfs and lvm volumes this issue may raise if there is no data in the volume. Would it be a reasonable workaround adding some extra file to reach the minimum size btrfs requires?

On the other hand, just out of curiosity, is there any reason to use btrfs together with LVM volumes? The common approach is just using btrfs subvolumes, I know it is not the same but for many use cases they just work the same.

Agree. This should be a dup of #1835. It there any updates to fix this issue? I see it was opened one year ago.

In my case, this config is required to do so.

@davidcassany
Copy link
Collaborator

It there any updates to fix this issue? I see it was opened one year ago.

I don't think so, unfortunately. But at a time it was an issue I reported after debugging a very weird (I'd even say wrong) xml description someone was struggling with. The issue on user side was solved by using different XML setup (switch lvm to subvolumes or different fs) or by adding some extra file to reach the minimum, I don't remember all details. All in all, the issue did not get much attraction as there wasn't any user asking for it (until now) and it looked like a tiny a corner case.

Probably now it is the time to address it. I'll try to find some time these days to move it on again.

@davidcassany
Copy link
Collaborator

Closing as duplicate of #1835, feel free to reopen if this is not an accurate duplicate

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

No branches or pull requests

2 participants