<div dir="ltr">So here is the Query:<div><br></div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"DejaVu Sans Mono";font-size:11.7pt"><span style="color:rgb(204,120,50)">BEGIN<br></span><span style="color:rgb(204,120,50)"> </span><span style="color:rgb(128,128,128)">-- Creating a temporary table which will give all the images and the disks which resids on only the specified storage domain. (copied template disks on multiple storage domains will not be part of this table)<br></span><span style="color:rgb(128,128,128)"> </span><span style="color:rgb(204,120,50)">CREATE TEMPORARY TABLE </span>STORAGE_DOMAIN_MAP_TABLE <span style="color:rgb(204,120,50)">AS<br></span><span style="color:rgb(204,120,50)"><br></span><span style="color:rgb(204,120,50)"> SELECT </span>image_guid <span style="color:rgb(204,120,50)">AS </span>image_id,<br> disk_id<br> <span style="color:rgb(204,120,50)">FROM </span>memory_and_disk_images_storage_domain_view<br> <span style="color:rgb(204,120,50)">WHERE </span>storage_id = v_storage_domain_id<br><br> <span style="color:rgb(204,120,50)">EXCEPT<br></span><span style="color:rgb(204,120,50)"><br></span><span style="color:rgb(204,120,50)"> SELECT </span>image_guid <span style="color:rgb(204,120,50)">AS </span>image_id,<br> disk_id<br> <span style="color:rgb(204,120,50)">FROM </span>memory_and_disk_images_storage_domain_view<br> <span style="color:rgb(204,120,50)">WHERE </span>storage_id != v_storage_domain_id;<br><br> <span style="color:rgb(204,120,50)">exception when </span>others <span style="color:rgb(204,120,50)">then<br></span><span style="color:rgb(204,120,50)"><br></span><span style="color:rgb(204,120,50)"> </span>TRUNCATE <span style="color:rgb(204,120,50)">TABLE </span>STORAGE_DOMAIN_MAP_TABLE;<br><br> <span style="color:rgb(204,120,50)">INSERT INTO </span>STORAGE_DOMAIN_MAP_TABLE<br> <span style="color:rgb(204,120,50)">SELECT </span>image_guid <span style="color:rgb(204,120,50)">AS </span>image_id,<br> disk_id<br> <span style="color:rgb(204,120,50)">FROM </span>memory_and_disk_images_storage_domain_view<br> <span style="color:rgb(204,120,50)">WHERE </span>storage_id = v_storage_domain_id<br><br> <span style="color:rgb(204,120,50)">EXCEPT<br></span><span style="color:rgb(204,120,50)"><br></span><span style="color:rgb(204,120,50)"> SELECT </span>image_guid <span style="color:rgb(204,120,50)">AS </span>image_id,<br> disk_id<br> <span style="color:rgb(204,120,50)">FROM </span>memory_and_disk_images_storage_domain_view<br> <span style="color:rgb(204,120,50)">WHERE </span>storage_id != v_storage_domain_id;<br><span style="color:rgb(204,120,50)">END</span>;</pre></div><div>Try to run it and share the results please.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 4:01 PM, Eyal Shenitzky <span dir="ltr"><<a href="mailto:eshenitz@redhat.com" target="_blank">eshenitz@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Note that destroy and remove are two different operations.<div><br></div><div>Did you try both?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 3:17 PM, Ladislav Humenik <span dir="ltr"><<a href="mailto:ladislav.humenik@1und1.de" target="_blank">ladislav.humenik@1und1.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi, of course i did. I put these domain's first in to
maintenance, then Detached it from the datacenter. <br>
</p>
<p>The last step is destroy or remove "just name it" and this last
step is mysteriously not working. <br>
</p>
<img src="cid:part1.F9B078FC.7148F417@1und1.de" alt=""><br>
<br>
and throwing sql exception which I attached before.<br>
<br>
Thank you in advance<br>
ladislav<br>
<br>
<div class="m_1726836102130701725m_8084450931878004801moz-cite-prefix">On 21.02.2018 14:03, Eyal Shenitzky
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Did you manage to set the domain to maintenance?
<div><br>
</div>
<div>If so you can try to 'Destroy' the domain.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Feb 21, 2018 at 2:57 PM,
Ladislav Humenik <span dir="ltr"><<a href="mailto:ladislav.humenik@1und1.de" target="_blank">ladislav.humenik@1und1.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi, no</p>
<p><br>
</p>
<p>this table "STORAGE_DOMAIN_MAP_TABLE" is not present at
any of our ovirt's and <br>
</p>
<p>based on <a href="http://?ui=2&ik=0712e9a1b3&view=fimg&th=161b8714ec199ae3&attid=0.1.1&disp=emb&attbid=ANGjdJ9PPOWU6bxvze9lPAM_2gBE-uu8fFppbzl2kuXMhSwyKx4QWo0sFYbLjNBgMhB0RdoOM_e16gleR75ZmUYnx3ndhB0CgYgXtvtBs7wNxOYf-o9rWv42duaUwsw&sz=s0-l75-ft&ats=1519218030205&rm=161b8714ec199ae3&zw&atsh=0" target="_blank">link</a> this
is just a temporary table. Can you point me to what
query should I test?</p>
<p>thank you in advance</p>
<p>Ladislav<br>
</p>
<br>
<div class="m_1726836102130701725m_8084450931878004801m_1598474974025300265moz-cite-prefix">On
21.02.2018 12:50, Eyal Shenitzky wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>According to the logs, it seems like you somehow
missing a table in the DB - </div>
<div>
<pre class="m_1726836102130701725m_8084450931878004801m_1598474974025300265gmail-aLF-aPX-K0-aPE" style="display:block;font-family:"Courier New",Courier,monospace,arial,sans-serif;margin:0px;white-space:pre-wrap;word-wrap:break-word;background-color:rgb(255,255,255);color:rgb(0,0,0);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">STORAGE_DOMAIN_MAP_TABLE.</pre>
<pre class="m_1726836102130701725m_8084450931878004801m_1598474974025300265gmail-aLF-aPX-K0-aPE" style="display:block;margin:0px;word-wrap:break-word;background-color:rgb(255,255,255);text-align:left;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial"><font color="#000000" face="Courier New, Courier, monospace, arial, sans-serif"><span style="font-size:14px;white-space:pre-wrap">4211-b98f-a37604642251] Command 'org.ovirt.engine.core.bll.sto<wbr>rage.domain.RemoveStorageDomai<wbr>nCommand' failed: CallableStatementCallback; bad SQL grammar [{call force_delete_storage_domain(?)<wbr>}]; nested exception is org.postgresql.util.PSQLExcept<wbr>ion: ERROR: relation "storage_domain_map_table" does not exist
</span></font></pre>
<pre class="m_1726836102130701725m_8084450931878004801m_1598474974025300265gmail-aLF-aPX-K0-aPE" style="display:block;font-family:"Courier New",Courier,monospace,arial,sans-serif;margin:0px;white-space:pre-wrap;word-wrap:break-word;background-color:rgb(255,255,255);color:rgb(0,0,0);font-size:14px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Did you tryied to run some SQL query which cause that issue?</span>
</pre>
<br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Feb 21, 2018 at 11:48
AM, Ladislav Humenik <span dir="ltr"><<a href="mailto:ladislav.humenik@1und1.de" target="_blank">ladislav.humenik@1und1.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> Hello, <br>
<br>
we can not remove old NFS-data storage domains,
this 4 are already deactivated and unattached:<br>
<span class="m_1726836102130701725m_8084450931878004801m_1598474974025300265m_2572608747032311022gwt-InlineLabel"><br>
engine=> select id,storage_name from
storage_domains where storage_name like
'bs09%';<br>
id |
storage_name <br>
------------------------------<wbr>--------+---------------<br>
819b419e-638b-43c7-9189-b93c0<wbr>314d38a |
bs09aF2C10kvm<br>
9a403356-f58a-4e80-9435-026e6<wbr>f853a9b |
bs09bF2C10kvm<br>
f5efd264-045b-48d5-b35c-661a3<wbr>0461de5 |
bs09aF2C9kvm<br>
a0989c64-fc41-4a8b-8544-91413<wbr>7d7eae8 |
bs09bF2C9kvm<br>
(4 rows)<br>
<br>
</span><span class="m_1726836102130701725m_8084450931878004801m_1598474974025300265m_2572608747032311022gwt-InlineLabel"><br>
The only images which still resides in DB are
OVF_STORE templates:<br>
<br>
engine=> select
image_guid,storage_name,disk_d<wbr>escription
from images_storage_domain_view where
storage_name like 'bs09%';<br>
image_guid |
storage_name | disk_description <br>
------------------------------<wbr>--------+---------------+-----<wbr>-------------<br>
6b72139d-a4b3-4e22-98e2-e8b1d<wbr>64e8e50 |
bs09bF2C9kvm | OVF_STORE<br>
997fe5a6-9647-4d42-b074-27767<wbr>984b7d2 |
bs09bF2C9kvm | OVF_STORE<br>
2b1884cb-eb37-475f-9c24-96384<wbr>00f15af |
bs09aF2C10kvm | OVF_STORE<br>
85383ffe-68ba-4a82-a692-d93e3<wbr>8bf7f4c |
bs09aF2C9kvm | OVF_STORE<br>
bca14796-aed1-4747-87c9-1b258<wbr>61fad86 |
bs09aF2C9kvm | OVF_STORE<br>
797c27bf-7c2d-4363-96f9-565fa<wbr>58d0a5e |
bs09bF2C10kvm | OVF_STORE<br>
5d092a1b-597c-48a3-8058-cbe40<wbr>d39c2c9 |
bs09bF2C10kvm | OVF_STORE<br>
dc61f42f-1330-4bfb-986a-d868c<wbr>736da59 |
bs09aF2C10kvm | OVF_STORE<br>
(8 rows)<br>
<br>
<br>
<br>
</span>Current oVirt Engine version: <span class="m_1726836102130701725m_8084450931878004801m_1598474974025300265m_2572608747032311022gwt-InlineLabel">4.1.8.2-1.el7.centos<br>
Exception logs from engine are in attachment<br>
<br>
Do you have any magic sql statement to figure
out what is causing this exception and how we
can remove those storage domains without
disruption ?<br>
<br>
Thank you in advance</span><span class="m_1726836102130701725m_8084450931878004801m_1598474974025300265HOEnZb"><font color="#888888"><br>
<pre class="m_1726836102130701725m_8084450931878004801m_1598474974025300265m_2572608747032311022moz-signature" cols="72">--
Ladislav Humenik</pre>
</font></span></div>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org" target="_blank">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_1726836102130701725m_8084450931878004801m_1598474974025300265gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">Regards,
<div>Eyal Shenitzky</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="m_1726836102130701725m_8084450931878004801m_1598474974025300265moz-signature" cols="72">--
Ladislav Humenik
System administrator / VI
IT Operations Hosting Infrastructure
1&1 Internet SE | <a href="https://maps.google.com/?q=Ernst-Frey-Str.+5+%7C+76135+Karlsruhe+%7C+Germany&entry=gmail&source=g" target="_blank">Ernst-Frey-Str. 5 | 76135 Karlsruhe | Germany</a>
Phone: <a href="tel:+49%20721%20913748361" value="+49721913748361" target="_blank">+49 721 91374-8361</a>
E-Mail: <a class="m_1726836102130701725m_8084450931878004801m_1598474974025300265moz-txt-link-abbreviated" href="mailto:ladislav.humenik@1und1.de" target="_blank">ladislav.humenik@1und1.de</a> | Web: <a class="m_1726836102130701725m_8084450931878004801m_1598474974025300265moz-txt-link-abbreviated" href="http://www.1und1.de" target="_blank">www.1und1.de</a>
Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 24498
Vorstand: Robert Hoffmann, Hans-Henning Kettler, Uwe Lamnek, Matthias Steinberg
Aufsichtsratsvorsitzender: René Obermann
Member of United Internet
Diese E-Mail kann vertrauliche und/oder gesetzlich geschützte Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat sind oder diese E-Mail irrtümlich erhalten haben, unterrichten Sie bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem bestimmungsgemäßen Adressaten ist untersagt, diese E-Mail zu speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu verwenden.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that saving, distribution or use of the content of this e-mail in any way is prohibited. If you have received this e-mail in error, please notify the sender and delete the e-mail.</pre>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_1726836102130701725m_8084450931878004801gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">Regards,
<div>Eyal Shenitzky</div>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="m_1726836102130701725m_8084450931878004801moz-signature" cols="72">--
Ladislav Humenik
System administrator / VI
IT Operations Hosting Infrastructure
1&1 Internet SE | <a href="https://maps.google.com/?q=Ernst-Frey-Str.+5+%7C+76135+Karlsruhe+%7C+Germany&entry=gmail&source=g" target="_blank">Ernst-Frey-Str. 5 | 76135 Karlsruhe | Germany</a>
Phone: <a href="tel:+49%20721%20913748361" value="+49721913748361" target="_blank">+49 721 91374-8361</a>
E-Mail: <a class="m_1726836102130701725m_8084450931878004801moz-txt-link-abbreviated" href="mailto:ladislav.humenik@1und1.de" target="_blank">ladislav.humenik@1und1.de</a> | Web: <a class="m_1726836102130701725m_8084450931878004801moz-txt-link-abbreviated" href="http://www.1und1.de" target="_blank">www.1und1.de</a>
Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 24498
Vorstand: Robert Hoffmann, Hans-Henning Kettler, Uwe Lamnek, Matthias Steinberg
Aufsichtsratsvorsitzender: René Obermann
Member of United Internet
Diese E-Mail kann vertrauliche und/oder gesetzlich geschützte Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat sind oder diese E-Mail irrtümlich erhalten haben, unterrichten Sie bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem bestimmungsgemäßen Adressaten ist untersagt, diese E-Mail zu speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu verwenden.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that saving, distribution or use of the content of this e-mail in any way is prohibited. If you have received this e-mail in error, please notify the sender and delete the e-mail.</pre><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_1726836102130701725gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Eyal Shenitzky</div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Regards,<div>Eyal Shenitzky</div></div></div>
</div>