Issue


When deleting a virtual server, the following message appears:

Running: Storage API Call: PUT 000.000.00.0:0000/lvm/Datastore/onapp-xxxxxxxxxxxxxx/VDisk/yyyyyyyyyyyyyy "{\"state\":2}"
OnApp::Actions::Fatal Storage API Call failed: {"result"=>"FAILURE", "Error"=>"Error running lvchange: One or more specified logical volume(s) not found.\n"}
Fatal: OnApp::Actions::Fatal Storage API Call failed: {"result"=>"FAILURE", "Error"=>"Error running lvchange: One or more specified logical volume(s) not found.\n"}
Executing Rollback...
CODE

Environment


Any OnApp using LVM datastore 


Resolution


  1. Create a disk on a compute resource in the correct datastore (volume group).
  2. SSH into the compute resource or backup server. The server mentioned in the storage API call should work for this.

Example

[onapp@cp]# ssh root@192.168.10.2 
[onapp@cp]# lvcreate -L1G -n yyyyyyyyyyyyyy onapp-xxxxxxxxxxxxxx
CODE

It will create an empty 1 GB disk to ensure the smooth deletion of the virtual server. Destroy it through the interface.

Sometimes an error may occur if a new LV is only 1 GB. In this case, create a new LV with the size of the deleted disk and try again.


Cause


The issue is caused due to the fact that the database was not correctly updated and OnApp is trying to delete the logical volume for the second time after it was deleted from the datastore.