On 20.04.2014 10:57, Salvatore Sciacco wrote:
ACS version: 4.2.1
Hypervisors: KVM
Storage pool type: CLVM

Since we upgraded from 4.1 to 4.2.1 moving volumes to a different primary storage pool fail. I've enabled debug on the agents side and I think there
is a problem with the format  type conversion

Volume on database has format QCOW2

these are the parameters for the first step (CLVM -> NFS):

"srcTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"cda46430-52d7-4bf0-b0c2-adfc78dd011c","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"655d6965-b3f3-4118-a970-d50cf6afc365","id":211,"poolType":"CLVM","host":"localhost","path":"/FC10KY1","port":0}},"name":"ROOT-4450","size":5368709120,"path":"39a25daf-23a1-4b65-99ac-fb98469ac197","volumeId":5937,"vmName":"i-402-4450-VM","accountId":402,"format":"QCOW2","id":5937,"hypervisorType":"KVM"}}

"destTO":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"cda46430-52d7-4bf0-b0c2-adfc78dd011c","volumeType":"ROOT","dataStore":{"com.cloud.agent.api.to.NfsTO":{"_url":"nfs://
192.168.11.6/home/a1iwstack
","_role":"Image"}},"name":"ROOT-4450","size":5368709120,"path":"volumes/402/5937","volumeId":5937,"vmName":"i-402-4450-VM","accountId":402,"format":"QCOW2","id":5937,"hypervisorType":"KVM"}}


Those commads are translated into the agent:
DEBUG [utils.script.Script] (agentRequest-Handler-1:null) Executing:
qemu-img info /dev/FC10KY1/39a25daf-23a1-4b65-99ac-fb98469ac197
DEBUG [utils.script.Script] (agentRequest-Handler-1:null) Execution is
successful.
DEBUG [utils.script.Script] (agentRequest-Handler-1:null) Executing: */bin/bash
-c cp -f /dev/FC10KY1/39a25daf-23a1-4b65-99ac-fb98469ac197
/mnt/b8311c72-fe75-3832-98fc-975445028a12/5c713376-c418-478c-8a31-89c4181cb48e.qcow2*


With the result that the output file isn't a qcow2 file but a raw
partition, which in turn make the next step fail.
(NFS -> CLVM)

It looks like a bug, "qemu-img convert" should be used instead of "cp -f", among others.
Do you mind opening an issue in https://issues.apache.org/jira ?

Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

Reply via email to