Here is an example of the attached test script hitting the bug:
# ./snapshot-collision.sh systemvg 4 1 4G 2G Attempting to empty disk caches ... 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 8.92084 seconds, 120 MB/s Creating test LVs ... Logical volume "poc1" created Logical volume "poc2" created Logical volume "poc3" created Logical volume "poc4" created Creating snapshots ... LV systemvg/poc2-1 in use: not deactivating Couldn't deactivate new snapshot. LV systemvg/poc3-1 in use: not deactivating Couldn't deactivate new snapshot. Logical volume "poc1-1" created LV systemvg/poc4-1 in use: not deactivating Couldn't deactivate new snapshot. Done Deleting snapshots ... umount: /mnt/poc3-1: not mounted umount: /mnt/poc2-1: not mounted umount: /mnt/poc4-1: not mounted Logical volume "poc1-1" successfully removed Deleteing test LVs ... Logical volume "poc1" successfully removed Logical volume "poc2" successfully removed Logical volume "poc3" successfully removed Logical volume "poc4" successfully removed
Here is an example of the attached test script hitting the bug:
# ./snapshot- collision. sh systemvg 4 1 4G 2G
Attempting to empty disk caches ...
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 8.92084 seconds, 120 MB/s
Creating test LVs ...
Logical volume "poc1" created
Logical volume "poc2" created
Logical volume "poc3" created
Logical volume "poc4" created
Creating snapshots ...
LV systemvg/poc2-1 in use: not deactivating
Couldn't deactivate new snapshot.
LV systemvg/poc3-1 in use: not deactivating
Couldn't deactivate new snapshot.
Logical volume "poc1-1" created
LV systemvg/poc4-1 in use: not deactivating
Couldn't deactivate new snapshot.
Done
Deleting snapshots ...
umount: /mnt/poc3-1: not mounted
umount: /mnt/poc2-1: not mounted
umount: /mnt/poc4-1: not mounted
Logical volume "poc1-1" successfully removed
Deleteing test LVs ...
Logical volume "poc1" successfully removed
Logical volume "poc2" successfully removed
Logical volume "poc3" successfully removed
Logical volume "poc4" successfully removed