Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-29 Thread Nux!

On 28.04.2014 23:58, Salvatore Sciacco wrote:

Hello Lucian,

did you have any chance to try to reproduce my setup? :-)

Best,


Sorry Salvatore, have not had the time to do it, I'll try to make some 
time today and test.


Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro


Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-28 Thread Salvatore Sciacco
Hello Lucian,

did you have any chance to try to reproduce my setup? :-)

Best,

S.


2014-04-20 15:26 GMT+02:00 Nux! n...@li.nux.ro:

 On 20.04.2014 13:24, Salvatore Sciacco wrote:

 2014-04-20 12:31 GMT+02:00 Nux! n...@li.nux.ro:

  It looks like a bug, qemu-img convert should be used instead of cp
 -f,
 among others.


 I suppose that some code was added to do a simple copy when format is the
 same, this wasn't the case with 4.1.1 version.




  Do you mind opening an issue in https://issues.apache.org/jira ?



 Already did :-)

 https://issues.apache.org/jira/browse/CLOUDSTACK-6462

 Thanks

 S.


 Cool, I'll try to find out after the holidays if the problem exists in 4.3
 as well and if yes, bug some people about it.

 Happy Easter :-)


 Lucian

 --
 Sent from the Delta quadrant using Borg technology!

 Nux!
 www.nux.ro



Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-23 Thread rammohan ganapavarapu
Does any one configured clvm for primary storage? can you please help me to
configure clvm with iscsi LUNs?

Ram


On Sun, Apr 20, 2014 at 2:57 AM, Salvatore Sciacco scia...@iperweb.comwrote:

 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)

 DEBUG [utils.script.Script] (agentRequest-Handler-2:) Executing: qemu-img
 info

 /mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2
 DEBUG [utils.script.Script] (agentRequest-Handler-2:) Execution is
 successful.
 DEBUG [utils.script.Script] (agentRequest-Handler-2:) Executing: qemu-img
 convert -f qcow2 -O

 raw/mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2
 /dev/FCSTORAGE/da162325-467b-4e78-af07-4bad85470d66
 DEBUG [utils.script.Script] (agentRequest-Handler-2:) Exit value is 1
 DEBUG [utils.script.Script] (agentRequest-Handler-2:) qemu-img: Could not
 open

 '/mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2'qemu-img:
 Could not open

 '/mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2'
 ERROR [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-2:) Failed
 to convert

 /mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2
 to /dev/FCSTORAGE/da162325-467b-4e78-af07-4bad85470d66 the error was:
 qemu-img: Could not open

 '/mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2'qemu-img:
 Could not open

 '/mnt/b8311c72-fe75-3832-98fc-975445028a12/b9303d8d-cd51-4b6c-a244-43c405df4238.qcow2'

 If I change on the database the format of the volume to RAW the effect is
 even worse as *data is lost* in the process!

 These are the parameter 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-a970d50cf6afc365,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-4024450VM,accountId:402,
 format:RAW,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:ROOT4450,size:5368709120,path:volumes/402/5937,volumeId:5937,vmName:i-402-4450-VM,accountId:402,
 format:RAW,id:5937,hypervisorType:KVM}}

 this time the output is converted to qcow2!

 DEBUG [utils.script.Script] (agentRequest-Handler-3:null) Executing:
 qemu-img info /dev/FC10KY1/39a25daf-23a1-4b65-99ac-fb98469ac197
 DEBUG [utils.script.Script] (agentRequest-Handler-3:null) Execution is
 successful.
 DEBUG [utils.script.Script] (agentRequest-Handler-3:null) *Executing:
 qemu-img convert -f raw -O qcow2
 */dev/FC10KY1/39a25daf-23a1-4b65-99ac-fb98469ac197

 /mnt/b8311c72-fe75-3832-98fc-975445028a12/01ab129f-aaf6-4b1a-8e2a-093bee0b811c.raw


 and *data is lost* in the next step (NFS - CLVM):


 srcTO:{org.apache.cloudstack.storage.to.VolumeObjectTO:{uuid:cda46430-52d7-4bf0-b0c2-adfc78dd011c,volumeType:ROOT,dataStore:{
 com.cl
 

Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-22 Thread Salvatore Sciacco
Thanks!
:-)

I suppose there isn't much people running different CLVM pools in the same
zone...

S.



2014-04-20 15:26 GMT+02:00 Nux! n...@li.nux.ro:

 On 20.04.2014 13:24, Salvatore Sciacco wrote:

 2014-04-20 12:31 GMT+02:00 Nux! n...@li.nux.ro:

  It looks like a bug, qemu-img convert should be used instead of cp
 -f,
 among others.


 I suppose that some code was added to do a simple copy when format is the
 same, this wasn't the case with 4.1.1 version.




  Do you mind opening an issue in https://issues.apache.org/jira ?



 Already did :-)

 https://issues.apache.org/jira/browse/CLOUDSTACK-6462

 Thanks

 S.


 Cool, I'll try to find out after the holidays if the problem exists in 4.3
 as well and if yes, bug some people about it.

 Happy Easter :-)


 Lucian

 --
 Sent from the Delta quadrant using Borg technology!

 Nux!
 www.nux.ro



Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-20 Thread Nux!

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


Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-20 Thread Salvatore Sciacco
2014-04-20 12:31 GMT+02:00 Nux! n...@li.nux.ro:

 It looks like a bug, qemu-img convert should be used instead of cp -f,
 among others.


I suppose that some code was added to do a simple copy when format is the
same, this wasn't the case with 4.1.1 version.




Do you mind opening an issue in https://issues.apache.org/jira ?


Already did :-)

https://issues.apache.org/jira/browse/CLOUDSTACK-6462

Thanks

S.


Re: KVM - Migration of CLVM volumes to another primary storage fail

2014-04-20 Thread Nux!

On 20.04.2014 13:24, Salvatore Sciacco wrote:

2014-04-20 12:31 GMT+02:00 Nux! n...@li.nux.ro:

It looks like a bug, qemu-img convert should be used instead of cp 
-f,

among others.



I suppose that some code was added to do a simple copy when format is 
the

same, this wasn't the case with 4.1.1 version.






Do you mind opening an issue in https://issues.apache.org/jira ?




Already did :-)

https://issues.apache.org/jira/browse/CLOUDSTACK-6462

Thanks

S.


Cool, I'll try to find out after the holidays if the problem exists in 
4.3 as well and if yes, bug some people about it.


Happy Easter :-)

Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro