Skip to content

Commit

Permalink
feat: add support to extending existing snapshots to required percentage
Browse files Browse the repository at this point in the history
Reason: MVP requirements call for managment of snapshots as sets

Result: Users can set minimum space available percentage for snapshots

Signed-off-by: Todd Gill <[email protected]>
Co-authored-by: Richard Megginson <[email protected]>
  • Loading branch information
trgill and richm committed Jan 31, 2024
1 parent cfe092b commit 661b4f9
Show file tree
Hide file tree
Showing 7 changed files with 869 additions and 68 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ This variable is required. It supports one of the following values:
snapshot are open, the merge is deferred until the next time the server reboots and the
source logical volume is activated.

- `extend`: Extend snapshot to have at least snapshot_lvm_percent_space_required space allocated to the
snapshot. Allocations are rounded up to the next multiple of the volume group extent size.

### snapshot_lvm_set

The snapshot role supports sets of volumes. Sets may contain any number of volumes.
Expand Down
7 changes: 7 additions & 0 deletions tasks/extend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-License-Identifier: MIT
---
- name: Extend Snapshot
ansible.builtin.script: "{{ __snapshot_cmd }}"
args:
executable: "{{ __snapshot_python }}"
register: snapshot_cmd
Loading

0 comments on commit 661b4f9

Please sign in to comment.