Scenario
- Create and attach a Longhorn volumes.
- Write some data to the volume then create the 1st snapshot. e.g.
dd if=/dev/urandom of=/dev/longhorn/<Longhorn volume name> bs=1M count=100
- Try to delete the 1st snapshot. The snapshot will be marked as
Removed
then hidden on the volume detail page. - Write some non-overlapping data to the volume then create the 2nd snapshot. e.g.
dd if=/dev/urandom of=/dev/longhorn/<Longhorn volume name> bs=1M count=100 seek=100
- Re-try deleting the 1st snapshot via UI.
- Verify snapshot purge is triggered:
- The 1st snapshot will be coalesced with the 2nd one, which means the size should be 200Mi.
- The final snapshot name is the name of the 2nd one.