How do I remove stale device mappers from zombied backups?
LVM/SAN Data Store
1) Set maximum allowed backups to 0 in settings->configuration (backups/templates tab)
2) Wait for the currently running backups to finish
3) For each HV, go there and type
dmsetup ls | grep onapp | grep backup. Since there should be 0 running backups when you are doing this, there should be nothing in the output. You can safely remove anything that comes out is an old dm entry.
If the dm entries are not easily removed, you may need to:
- Unmount the disk. For entries that end with X1, you should run this first:
kpartx -d -p X /dev/mapper/backup-XXXXXXXXXX
- Remove their iscsi targets from tgtd-
- Or even restart tdtd altogether.
4) You can also remove zombie snapshot disks. They can be found with:
lvscan | grep onapp | grep backup
5) Set the maximum allowed backups back to the original value.