Trying to resize VM disk on LVM storage gives error like -
"Error running lvchange: LV onapp-e4jsf92mjh6wk7/e7salolw28scol has open snapshot backup-hsak2e90z2m2jt: not deactivating\n"
All OnApp Cloud Versions using LVM datastore.
Log on to server listed in the failed log and run lvdisplay looking for that VM disk on the datastore -
lvdisplay /dev/onapp-e4jsf92mjh6wk7/e7salolw28scol -
(If you are looking at storageAPI error, the server IP is listed in the call, and the datastore and disk identifier will be in the URL - Datastore/<datastore identifier>Vdisk/<disk identifier> )
See what the LV snapshot status is, example -
Now run lvremove and try to remove the snapshot - as example -
[root@hv1-onappCorp ~]# lvremove /dev/onapp-e4jsf92mjh6wk7/backup-hsak2e90z2m2jt Can't remove open logical volume "backup-hsak2e90z2m2jt"
If you get this error, try to find process that is holding snapshot open, or if the snapshot is mapped or mounted and release these - example commands to check -
[root@hv1-onappCorp ~]# lsof /dev/onapp-e4jsf92mjh6wk7/backup-hsak2e90z2m2jt [root@hv1-onappCorp ~]# mount
You should see:
Then try to lvremove again, you should see something like this -
Do you really want to remove active logical volume backup-hsak2e90z2m2jt? [y/n]: y. Logical volume "backup-hsak2e90z2m2jt" successfully removed
Sometimes you will see error about -real device, if you can not locate a snapshot, try checking the dmsetup tree.
Steps for handling -real type errors can be found in KB here -