Skip to content

Conversation

@presztak
Copy link
Collaborator

Closes: #2562

@presztak presztak force-pushed the lvmcluster_snapshot branch 8 times, most recently from 07de11f to f07e3ea Compare November 25, 2025 21:55
@github-actions github-actions bot added the Documentation Documentation needs updating label Nov 25, 2025
@presztak presztak force-pushed the lvmcluster_snapshot branch 6 times, most recently from dcf53ab to 82d1484 Compare December 2, 2025 18:10
@presztak presztak force-pushed the lvmcluster_snapshot branch 3 times, most recently from 6b1e605 to 25a446c Compare December 4, 2025 12:31
@github-actions github-actions bot added the API Changes to the REST API label Dec 4, 2025
@presztak presztak force-pushed the lvmcluster_snapshot branch 2 times, most recently from b57ab55 to 2f95d52 Compare December 4, 2025 13:59
@presztak presztak marked this pull request as ready for review December 4, 2025 14:11
@presztak presztak requested a review from stgraber as a code owner December 4, 2025 14:11
Comment on lines +1795 to +1796
pathName := d.lvmPath(d.config["lvm.vg_name"], vol.volType, vol.contentType, vol.name)
return filepath.Join("/dev", pathName), nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using lvmPath for an actual disk operation is unsafe and can lead to data loss, lvmPath should only be used to create arguments for the LVM commands.

When you need the path to the block device, you must use lvmDevPath instead as that one doesn't risk a udev race that causes the file to point to the wrong disk.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional validation was added to MountWithSnapshotsTask to check whether the backing path resolves to the same device as lvmDevPath (the function name may need to be improved).

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

* Implement a new block.type read-only volume option which would support raw or qcow2
* Disallow snapshot creation on lvmcluster volumes that have the 'security.shared'
  property set to true
* Change lvmcluster so that all new instance VM volumes get the qcow2 block.type
* Prevent the creation of snapshots on lvmcluster volumes of type VM or custom (block)
  that don't have the qcow2 'block.type'

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

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

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

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@presztak presztak force-pushed the lvmcluster_snapshot branch 3 times, most recently from e9c29f0 to 763e4ed Compare December 5, 2025 12:43
…napshots

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

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

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

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
…eting qcow2 instance volumes

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

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

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
@presztak presztak force-pushed the lvmcluster_snapshot branch from 763e4ed to 863f78f Compare December 6, 2025 16:25
@presztak presztak requested a review from stgraber December 6, 2025 16:40
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.

Fix snapshot handling on lvmcluster pools

2 participants