Skip to content

Add initial support for dependent volumes#3025

Merged
stgraber merged 24 commits intolxc:mainfrom
presztak:dependent_disks
Mar 17, 2026
Merged

Add initial support for dependent volumes#3025
stgraber merged 24 commits intolxc:mainfrom
presztak:dependent_disks

Conversation

@presztak
Copy link
Copy Markdown
Contributor

@presztak presztak commented Mar 12, 2026

This PR introduces a new dependent configuration key for disk devices and custom volumes.
Volumes marked as dependent are tied to the lifecycle of the instance they are attached to. Snapshot operations performed on the instance are automatically propagated to the dependent volume.

Specifically:

  • Creating an instance snapshot automatically creates a corresponding snapshot on the dependent volume.
  • Deleting an instance snapshot removes the corresponding snapshot on the dependent volume.
  • Direct snapshot creation or deletion on a dependent volume is not allowed.

Additionally, exporting an instance automatically includes its dependent volumes.

@github-actions github-actions bot added API Changes to the REST API Documentation Documentation needs updating labels Mar 12, 2026
@presztak presztak force-pushed the dependent_disks branch 4 times, most recently from 11c6206 to 5ffe75c Compare March 12, 2026 20:49
@presztak presztak marked this pull request as ready for review March 12, 2026 21:09
@presztak presztak requested a review from stgraber as a code owner March 12, 2026 21:09
@stgraber
Copy link
Copy Markdown
Member

@presztak can you do a quick rebase?

@presztak
Copy link
Copy Markdown
Contributor Author

@stgraber Done.

@presztak presztak force-pushed the dependent_disks branch 2 times, most recently from 6ed91c8 to 3b3105c Compare March 16, 2026 16:20
presztak added 17 commits March 16, 2026 14:24
1. Prevent attaching a dependent volume to more than one instance.
2. Disallow attaching dependent volumes that already have snapshots.
3. Automatically create blank snapshots on dependent volumes when attached to an instance

Signed-off-by: Piotr Resztak <[email protected]>
…porting/importing volumes

Signed-off-by: Piotr Resztak <[email protected]>
@stgraber stgraber merged commit 8249952 into lxc:main Mar 17, 2026
55 of 56 checks passed
@presztak presztak deleted the dependent_disks branch March 18, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Changes to the REST API Documentation Documentation needs updating

Development

Successfully merging this pull request may close these issues.

2 participants