Skip to content

Simplify config subvolume naming by using static "instance" prefix#3050

Merged
stgraber merged 3 commits intolxc:mainfrom
presztak:fix_btrfs_subvolume_names
Mar 20, 2026
Merged

Simplify config subvolume naming by using static "instance" prefix#3050
stgraber merged 3 commits intolxc:mainfrom
presztak:fix_btrfs_subvolume_names

Conversation

@presztak
Copy link
Collaborator

This PR updates the naming scheme for Btrfs subvolumes used as VM config volumes.

Previously, subvolumes were named using the instance name:

  • <instance-name>
  • <instance-name>-snap0

This PR replaces that with a static naming scheme:

  • instance
  • instance-snap0

By removing the dependency on the instance name, this simplifies a number of operations.
In particular, renaming an instance no longer requires renaming associated Btrfs subvolumes,
which reduces complexity and avoids unnecessary filesystem operations.

@presztak presztak force-pushed the fix_btrfs_subvolume_names branch 2 times, most recently from 5dcef3f to 1823cbc Compare March 19, 2026 09:03
@presztak presztak marked this pull request as ready for review March 19, 2026 09:19
@presztak presztak requested a review from stgraber as a code owner March 19, 2026 09:19
@stgraber
Copy link
Member

Looks good overall, just need to make the patch be non-fatal on conversion failure to avoid potentially deadlocking upgrades when a machine has some VMs with corrupted config volumes.

@stgraber
Copy link
Member

Those can be fixed later using the instance repair API which will re-build the volume using the new layout.

@presztak presztak force-pushed the fix_btrfs_subvolume_names branch 3 times, most recently from b3ed1d0 to d93dca0 Compare March 20, 2026 13:17
This is no longer needed because the config subvolume name no longer includes
the instance name, but uses the 'instance-' prefix instead.

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
…prefix

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
…-name>-' to 'instance-'

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@presztak presztak force-pushed the fix_btrfs_subvolume_names branch from d93dca0 to 7cc4249 Compare March 20, 2026 15:54
@stgraber stgraber merged commit 7794971 into lxc:main Mar 20, 2026
51 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants