@@ -35,8 +35,11 @@ This variable is required. It supports one of the following values:
3535
3636- ` remove ` : Remove snapshots that conform to the specified prefix and pattern
3737
38- - ` revert ` : Revert to snapshots that are specified by either the pattern or set.
39- If either the source LV or snapshot are open, the merge is deferred
38+ - ` revert ` : Initiate a revert to merge snapshots back into their origin volumes.
39+ For snapshots created with ` revertable: true ` , this command initiates
40+ the revert operation, and you must then reboot into the revert boot
41+ entry to complete the operation. For regular (non-revertable) snapshots,
42+ if either the source LV or snapshot are open, the merge is deferred
4043 until the next time the server reboots and the source logical volume
4144 is activated.
4245
@@ -140,9 +143,58 @@ defined with the "revertable" field:
140143` ` `
141144
142145When ` revertable: true` is set, a revert boot entry will be created in the boot menu.
143- Booting into this entry will automatically merge the snapshots back into their origin volumes,
144- providing a boot-time rollback mechanism. Both bootable and revertable can be set independently
145- or together.
146+ To perform a revert operation :
147+
148+ 1. First run `snapshot_lvm_action : revert` to initiate the revert
149+ 2. Then reboot into the revert boot entry to complete the revert operation
150+
151+ The revert boot entry alone does NOT initiate a revert - it must be preceded by running
152+ the revert action. Booting into the revert entry after running the revert action will
153+ start the merge operation on all affected volumes. The snapshot set will show a status
154+ of "Reverting" while in progress, and will be destroyed once the revert completes.
155+
156+ Both bootable and revertable can be set independently or together.
157+
158+ **Important**: Simply booting into the revert entry without first running the revert
159+ action will NOT perform a revert. The two-step process (revert action + revert boot) is
160+ required for disaster recovery.
161+
162+ # ### Complete Revertable Snapshot Workflow Example
163+
164+ ` ` ` yaml
165+ # 1. Create revertable snapshots before a risky operation (e.g., system upgrade)
166+ - name: Create revertable snapshot set
167+ include_role:
168+ name: linux-system-roles.snapshot
169+ vars:
170+ snapshot_lvm_action: snapshot
171+ snapshot_lvm_set:
172+ name: before-upgrade
173+ revertable: true
174+ volumes:
175+ - vg: system_vg
176+ lv: root
177+ percent_space_required: 20
178+ - vg: system_vg
179+ lv: var
180+ percent_space_required: 20
181+
182+ # 2. Perform your risky operation (upgrade, configuration change, etc.)
183+ # ...
184+
185+ # 3. If something goes wrong and you need to revert:
186+ - name: Initiate revert operation
187+ include_role:
188+ name: linux-system-roles.snapshot
189+ vars:
190+ snapshot_lvm_action: revert
191+ snapshot_lvm_set:
192+ name: before-upgrade
193+
194+ # 4. After running the revert action, reboot the system and select the
195+ # "Revert before-upgrade" entry from the boot menu to complete the revert.
196+ # The system will boot and merge the snapshots, reverting to the pre-upgrade state.
197+ ` ` `
146198
147199# ## snapshot_lvm_snapset_name
148200
@@ -285,10 +337,17 @@ entry. The boot entry will be removed when the snapset is removed.
285337Boolean - default is false. Only supported on operating systems that
286338support snapshot manager (snapm) version 0.5.0 or later. When set to true,
287339and passed to the 'snapshot' command, the snapshot created will have a
288- corresponding revert boot entry. Booting into the revert entry will trigger
289- an automatic revert operation, merging the snapshot back into the origin
290- volume. This provides a boot-time rollback mechanism for disaster recovery.
291- The revert boot entry will be removed when the snapset is removed.
340+ corresponding revert boot entry.
341+
342+ To perform a disaster recovery revert :
343+
344+ 1. Run `snapshot_lvm_action : revert` to initiate the revert operation
345+ 2. Reboot into the revert boot entry to complete the revert
346+
347+ The revert boot entry is part of a two-step process and does NOT initiate a
348+ revert on its own - you must first run the revert action, then boot into the
349+ revert entry. The revert boot entry will be removed when the snapset is removed
350+ or after a successful revert operation completes.
292351
293352# ## snapshot_use_copr (EXPERIMENTAL)
294353
0 commit comments