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: Handle pools whose source is a subvolume outside of the pool mount path #12498

Merged
merged 3 commits into from
Nov 16, 2023

Conversation

monstermunchkin
Copy link
Contributor

@monstermunchkin monstermunchkin commented Nov 3, 2023

This fixes an issue where btrfs pools whose source is a subvolume outside of the pool mount path would fail being created.
However, as this scenario is totally valid, it should be handled correctly.

Fixes #12496

Fixes regression from 7ebca54 in #12258

This adds a new function which checks whether the given path has
subvolumes.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
This replaces `getSubvolumes` with `hasSubvolumes` when creating a new
storage pool as the caller isn't interested in what the subvolumes are.

It also fixes a regression which caused storage pools with `source` set
to an existing subvolume to fail when being created.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
@tomponline tomponline merged commit 03bc41e into canonical:main Nov 16, 2023
26 checks passed
This pull request was closed.
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

Successfully merging this pull request may close these issues.

lxc storage create btrfs do not work anymore
2 participants