<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 9, 2017 at 1:01 PM, Fred Rolland <span dir="ltr">&lt;<a href="mailto:frolland@redhat.com" target="_blank">frolland@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div></div>I don&#39;t think it will work.<br>We rely heavily on LVM when working with iSCSI and FC and I am not sure how LVM will handle this kind of operation.<br></div><div>A storage domain is a VG that contains PVs (LUNS), and each disk is a LV.<br></div></div><div class="gmail-HOEnZb"><div class="gmail-h5"><div class="gmail_extra"><br></div></div></div></blockquote><div><br></div><div>Actually I executed several times raw &quot;dd&quot; operations to change internal disks of CentOS servers and in general they did have LVM structures with PV, VGs, LVs inside....</div><div><br></div><div>Finally I had some time to test and it seems it worked without problems.</div><div>I created a storage domain of 50Gb with 2 VMs on it and one of them had also a snapshot.</div><div>I was able to import at target a dd-copy of it as an iSCSI domain without problems.</div><div>I also created a template on the source domain, but its import fails: I get no error message at web admin gui level, but no action executed actually... on engine log file level I get an error of this type:</div><div><br></div><div><div>2017-03-19 01:37:24,387+01 ERROR [org.ovirt.engine.core.bll.CommandsFactory] (default task-11) [b7a5ef2f-694f-4d5a-851b-c52a5b1f0104] An exception has occurred while trying to create a command object for command &#39;ImportVmTemplateFromConfiguration&#39; with parameters &#39;ImportVmTemplateParameters:{commandId=&#39;ad3c8e81-4787-46bf-97cb-fe3bfa9f891e&#39;, user=&#39;null&#39;, commandType=&#39;Unknown&#39;}&#39;: WELD-000049: Unable to invoke protected final void org.ovirt.engine.core.bll.CommandBase.postConstruct() on org.ovirt.engine.core.bll.exportimport.ImportVmTemplateFromConfigurationCommand@353de47b</div><div>2017-03-19 01:37:24,388+01 ERROR [org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner] (default task-11) [b7a5ef2f-694f-4d5a-851b-c52a5b1f0104] Failed to execute multiple actions of type &#39;ImportVmTemplateFromConfiguration&#39;: null</div><div>2017-03-19 01:37:24,388+01 ERROR [org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner] (default task-11) [b7a5ef2f-694f-4d5a-851b-c52a5b1f0104] Exception: java.lang.NullPointerException</div><div>        at org.ovirt.engine.core.bll.NestedCommandFactory.createWrappedCommand(NestedCommandFactory.java:24) [bll.jar:]</div></div><div><br></div><div>Does it depend on the method or is there any problem in general in template import for storage domain import?</div><div>See below for details of the approach used.</div><div>Full engine logs and vdsm logs on target to crosscheck are here:</div><div><br></div><div><div>vdsm logs</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvUkhtejMxN0QxTUk/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvUkhtejMxN0QxTUk/view?usp=sharing</a></div><div><br></div><div>engine logs<br></div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvRGpHSU5jOU5IbTQ/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvRGpHSU5jOU5IbTQ/view?usp=sharing</a></div></div><div><br></div><div><br></div><div>Source storage domain consists of a FC LUN of 50Gb</div><div>Some details of it</div><div>DC</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvN1czUnJXYkR1bVE/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvN1czUnJXYkR1bVE/view?usp=sharing</a><br></div><div><br></div><div>General</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvTUM2QmxlQ19wOUk/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvTUM2QmxlQ19wOUk/view?usp=sharing</a></div><div><br></div><div>Disks</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvM0hRV0dkZF83eTA/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvM0hRV0dkZF83eTA/view?usp=sharing</a><br></div><div><br></div><div>DisksSnapshots</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvX19HTkdPdnc0V0U/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvX19HTkdPdnc0V0U/view?usp=sharing</a><br></div><div><br></div><div>Templates</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvMU1fLWkxVW0yM0E/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvMU1fLWkxVW0yM0E/view?usp=sharing</a><br></div><div><br></div><div>VMs</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvTHVsRWx5WWNUU0k/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvTHVsRWx5WWNUU0k/view?usp=sharing</a><br></div><div><br></div><div><br></div><div>I used a nested 4.1 ovirt as a target environment, with:</div><div>- one CentOS 7.3 vm for engine</div><div>- one CentOS 7.3 vm for host</div><div>- one vm for iSCSI target, using NAS4Free (very nice, I didn&#39;t know it before this test...)</div><div><br></div><div><div>- source lun (ovmsrv06)</div><div><br></div><div>[root@ovmsrv06 ~]# fdisk -l /dev/mapper/3600a0b80002999020000d2d358c2564b</div><div><br></div><div>Disk /dev/mapper/3600a0b80002999020000d2d358c2564b: 53.7 GB, 53687091200 bytes, 104857600 sectors</div><div>Units = sectors of 1 * 512 = 512 bytes</div><div>Sector size (logical/physical): 512 bytes / 512 bytes</div><div>I/O size (minimum/optimal): 512 bytes / 512 bytes</div><div><br></div><div><br></div><div>- I preliminarily access the target LUN through an helper CentOS 7.3 vm c7service, with iSCSI initiator utils</div><div><br></div><div>[root@c7service log]# fdisk -l /dev/sdb</div><div><br></div><div>Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors</div><div>Units = sectors of 1 * 512 = 512 bytes</div><div>Sector size (logical/physical): 512 bytes / 512 bytes</div><div>I/O size (minimum/optimal): 4096 bytes / 1048576 bytes</div><div><br></div><div>- after detaching the source storage domain as described before, as the source and target luns are not accessible from the same machine, so I use my client to transfer using a local fifo and compressing the data along the way (old stye method used in mid &#39;90 to create compressed Oracle exports when storage constrints was indeed a serious problem.... learnt at that time from the Unix guru Riccardo Ravelli ;-)</div><div><br></div><div>$ mkfifo travaso </div><div><br></div><div>- start reading from fifo and writing to target LUN over ssh<br></div><div><br></div><div>[g.cecchi@ope46 ~]$ cat travaso | ssh root@c7service&quot;gunzip | dd bs=1024k of=/dev/sdb&quot;</div><div><br></div><div>(at the end I will have</div><div>root@c7service&#39;s password: </div><div>20133+538064 records in</div><div>20133+538064 records out</div><div>53687091200 bytes (54 GB) copied, 1981.52 s, 27.1 MB/s</div><div>)</div><div><br></div><div>- read from source LUN at ovmsrv06 writing to local fifo in gzip format</div><div><br></div><div>$ ssh root@ovmsrv06 &quot;time dd if=/dev/mapper/3600a0b80002999020000d2d358c2564b bs=1024k | gzip &quot; | dd bs=1024k of=travaso </div><div>root@ovmsrv06 password: </div><div><br></div><div>(at the end I&#39;ll have</div><div>51200+0 records in</div><div>51200+0 records out</div><div>53687091200 bytes (54 GB) copied, 1973.41 s, 27.2 MB/s</div><div><br></div><div>real<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>32m53.418s</div><div>user<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>26m48.461s</div><div>sys<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>3m25.484s</div><div>0+1314903 records in</div><div>0+1314903 records out</div><div>21906833820 bytes (22 GB, 20 GiB) copied, 1975.71 s, 11.1 MB/s</div><div>)</div></div><div><br></div><div>- I create the target iSCSI oVirt environment and then select import domain and give the provided iSCSI LUN.</div><div><br></div><div>Some details of what I see now on target</div><div><br></div><div>import 1</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvSnpWcS1TWWV5VDg/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvSnpWcS1TWWV5VDg/view?usp=sharing</a><br></div><div><br></div><div>general</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvQm9yNDFicklfeDg/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvQm9yNDFicklfeDg/view?usp=sharing</a><br></div><div><br></div><div>template import tab</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvU0VHQ1NVWHpmdm8/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvU0VHQ1NVWHpmdm8/view?usp=sharing</a><br></div><div><br></div><div>vm import tab</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvTVhDY01NRUVCMzQ/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvTVhDY01NRUVCMzQ/view?usp=sharing</a><br></div><div><br></div><div>import vm step</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvUFAweUE4cTk0LWs/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvUFAweUE4cTk0LWs/view?usp=sharing</a><br></div><div><br></div><div>disks pre-import</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvVjBmc3RwWXg1ak0/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvVjBmc3RwWXg1ak0/view?usp=sharing</a><br></div><div><br></div><div>disks after import</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvU3pfTnhxWmROS3M/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvU3pfTnhxWmROS3M/view?usp=sharing</a><br></div><div><br></div><div>virtual machines list, after import</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvM1VJcWZBaDA1ckU/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvM1VJcWZBaDA1ckU/view?usp=sharing</a><br></div><div><br></div><div>snapshot view</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvdGZWWE9CbGR6aEE/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvdGZWWE9CbGR6aEE/view?usp=sharing</a><br></div><div><br></div><div>events</div><div><a href="https://drive.google.com/file/d/0BwoPbcrMv8mvOHVFWEp2a1VnenM/view?usp=sharing">https://drive.google.com/file/d/0BwoPbcrMv8mvOHVFWEp2a1VnenM/view?usp=sharing</a><br></div><div><br></div><div>Let me know if further info necessary to debug the template import problem...</div><div><br></div><div>Gianluca</div></div></div></div>