How do I remove stale device mappers from zombied backups?


OnApp 3.x-6.x

LVM/SAN datastore


To remove remove stale device mappers from zombied backups follow the next procedure:

  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 compute resource, 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.

4. 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- You can find the detailed instruction here.
  • Or even restart tdtd altogether.

5. You can also remove zombie snapshot disks. They can be found with: lvscan | grep onapp | grep backup
6. Set the maximum allowed backups back to the original value.