We moved this page to our Documentation Portal. You can find the latest updates here. |
Issue
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"
Environment
All OnApp Cloud Versions using LVM datastore
Resolution
Log on to the 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, for example:
/dev/onapp-e4jsf92mjh6wk7/backup-hsak2e90z2m2jt [active]
Now, run lvremove and try to remove the snapshot, for 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 the process that is holding the snapshot open, or if the snapshot is mapped or mounted and release these, for example:
[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
Additional Info
Sometimes you will see the 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 the KB here:
https://onapp.zendesk.com/entries/90783747--dmsetup-remove-Failure-real-errors-