Re: [ovirt-users] Can't remove a storage domain related to a broken hardware

------=_Part_1573992_482995922.1421055717805 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi !=20 I finally solved my problem by removing information related to broken stora= ge in the engine database.=20 I post below the sql queries I executed in postgres (with engine stopped wh= ile executing them) in order to remove storage domain. Maybe it can be usef= ul for somebody else in the same situation.=20 Connect to database=20 # su - postgres=20 # psql engine=20 identify broken storage=20 engine=3D# select id, storage_name from storage_domain_static;=20 id | storage_name=20 --------------------------------------+------------------------=20 34c95a44-db7f-4d0f-ba13-5f06a7feefe7 | my-broken-storage-domain=20 identify ovf disks on this storage=20 engine=3D# select storage_domain_id, ovf_disk_id from storage_domains_ovf_i= nfo where storage_domain_id =3D '34c95a44-db7f-4d0f-ba13-5f06a7feefe7';=20 storage_domain_id | ovf_disk_id=20 --------------------------------------+------------------------------------= --=20 34c95a44-db7f-4d0f-ba13-5f06a7feefe7 | 033f8fba-5145-47e8-b3b5-32a34a39ad11= =20 34c95a44-db7f-4d0f-ba13-5f06a7feefe7 | 2d9a6a40-1dd0-4180-b7c7-3829a443c825= =20 engine=3D# delete from storage_domain_dynamic where id =3D '34c95a44-db7f-4= d0f-ba13-5f06a7feefe7';=20 engine=3D# delete from storage_domain_static where id =3D '34c95a44-db7f-4d= 0f-ba13-5f06a7feefe7';=20 engine=3D# delete from base_disks where disk_id =3D '033f8fba-5145-47e8-b3b= 5-32a34a39ad11';=20 engine=3D# delete from base_disks where disk_id =3D '2d9a6a40-1dd0-4180-b7c= 7-3829a443c825';=20 engine=3D# delete from storage_domains_ovf_info where storage_domain_id =3D= '34c95a44-db7f-4d0f-ba13-5f06a7feefe7';=20 engine=3D# delete from storage_pool_iso_map where storage_id =3D '34c95a44-= db7f-4d0f-ba13-5f06a7feefe7';=20 identify and delete luns and connections related to storage (i did not take= notes of results of these ones, but it was easy to find the good lines). A= lso, i noticed that lun_storage_server_connection_map only contained inform= ation about iscsi storage, not fiber channel.=20 engine=3D# select * from luns;=20 engine=3D# delete from luns where physical_volume_id =3D 'IqOdm6-BWuT-9YBW-= uvM1-q41E-a3Cz-zPnWHq';=20 engine=3D# delete from lun_storage_server_connection_map where storage_serv= er_connection=3D'1b9f3167-3236-431e-93c2-ab5ee18eba04';=20 engine=3D# delete from lun_storage_server_connection_map where storage_serv= er_connection=3D'ea5971f8-e1a0-42e3-826d-b95e9031ce53';=20 engine=3D# delete from storage_server_connections where id=3D'1b9f3167-3236= -431e-93c2-ab5ee18eba04';=20 engine=3D# delete from storage_server_connections where id=3D'ea5971f8-e1a0= -42e3-826d-b95e9031ce53';=20 delete remaining disk(s) ; I had 1 virtual disk on this storage=20 engine=3D# delete from base_disks where disk_id=3D'03d651eb-14a9-4dca-8c87-= 605f101a5e0c';=20 engine=3D# delete from permissions where object_id=3D'03d651eb-14a9-4dca-8c= 87-605f101a5e0c';=20 Then started engine and all is fine now.=20 ----- Mail original -----=20
De: "Amit Aviram" <aaviram@redhat.com>=20 =C3=80: "Olivier Navas" <olivier.navas@sdis33.fr>=20 Envoy=C3=A9: Mardi 6 Janvier 2015 17:24:19=20 Objet: Re: [ovirt-users] Can't remove a storage domain related to a broke= n hardware=20 =20 =20 =20 ----- Original Message -----=20 From: "Olivier Navas" <olivier.navas@sdis33.fr>=20 Hi, can you please add the engine log?=20 =20 To: users@ovirt.org=20 Sent: Tuesday, January 6, 2015 11:28:42 AM=20 Subject: [ovirt-users] Can't remove a storage domain related to a broken= =20 hardware=20 =20 =20 Hello Ovirt users !=20 =20 I experienced an hardware failure on a ISCSI storage making it unrecovera= ble,=20 and I would like to remove it from storage domains.=20 =20 There was 1 disk on this storage domain, and this disk isn't attached to = any=20 VM anymore, but I still can't detach this storage domain from cluster.=20 =20 The storage domain is in "inactive" status and if I try to "detach" it fr= om=20 data center, ovirt tries to activate it. Obviously it can't activate it= =20 since hardware is broken, and it fails after several minutes with the eve= nt=20 "Failed to detach Storage Domain my_storage_domain to Data Center Default= .=20 (User: admin)". I can post my engine.log if useful.=20 =20 I need a way to force removal of this storage domain. Any trick would be= =20 greatly appreciated.=20 =20 Perhaps does Ovirt miss some sort of "force detach, i know what i'm doing= "=20 button ?=20 =20 I am running an Ovirt 3.5 cluster (engine with CentOS 6.6, 4 nodes with= =20 CentOS 7) with FC and ISCSI storage domains.=20 =20 Thanks for your help.=20 =20 =20 =20 =20 Ce courriel et tous les fichiers attach=C3=A9s qu'il contient sont confid= entiels=20 et destin=C3=A9s exclusivement =C3=A0 la personne =C3=A0 laquelle ils son= t adress=C3=A9s. Si=20 vous avez re=C3=A7u ce courriel par erreur, merci de le retourner =C3=A0 = son=20 exp=C3=A9diteur et de le d=C3=A9truire. Il est rappel=C3=A9 que tout mess= age =C3=A9lectronique=20 est susceptible d'alteration au cours de son acheminement sur internet.= =20 Seuls les documents officiels du SDIS sont de nature =C3=A0 engager sa=20 responsabilit=C3=A9. Les id=C3=A9es ou opinions pr=C3=A9sent=C3=A9es dans= ce courriel sont=20 celles de son auteur et ne repr=C3=A9sentent pas n=C3=A9cessairement cell= es du SDIS de=20 la Gironde.=20 =20 _______________________________________________=20 Users mailing list=20 Users@ovirt.org=20 http://lists.ovirt.org/mailman/listinfo/users=20 =20
<div>I finally solved my problem by removing information related to broken= storage in the engine database.<br></div><div><br></div><div>I post below =
</div><div>identify ovf disks on this storage<br></div><div><br></div><div= engine=3D# select storage_domain_id, ovf_disk_id from storage_domain= s_ovf_info where storage_domain_id =3D '34c95a44-db7f-4d0f-ba13-5f06a7feefe= 7';<br> storage_domain_id &nb= sp; | ovf_di= sk_id <br>-----------------= ---------------------+--------------------------------------<br> 34c95= a44-db7f-4d0f-ba13-5f06a7feefe7 | 033f8fba-5145-47e8-b3b5-32a34a39ad11<br>&= nbsp;34c95a44-db7f-4d0f-ba13-5f06a7feefe7 | 2d9a6a40-1dd0-4180-b7c7-3829a44= 3c825<br></div><div><br></div><div><br>engine=3D# delete from storage_domai= n_dynamic where id =3D '34c95a44-db7f-4d0f-ba13-5f06a7feefe7';<br>engine=3D= # delete from storage_domain_static where id =3D '34c95a44-db7f-4d0f-ba13-5= f06a7feefe7';<br>engine=3D# delete from base_disks where disk_id =3D '033f8= fba-5145-47e8-b3b5-32a34a39ad11';<br>engine=3D# delete from base_disks wher= e disk_id =3D '2d9a6a40-1dd0-4180-b7c7-3829a443c825';<br>engine=3D# delete = from storage_domains_ovf_info where storage_domain_id =3D '34c95a44-d= b7f-4d0f-ba13-5f06a7feefe7';<br>engine=3D# delete from storage_pool_iso_map= where storage_id =3D '34c95a44-db7f-4d0f-ba13-5f06a7feefe7';<br></di= v><div><br></div><div><br>identify and delete luns and connections related = to storage (i did not take notes of results of these ones, but it was easy = to find the good lines). Also, i noticed that lun_storage_server_connection= _map only contained information about iscsi storage, not fiber channel.<br>= </div><div><br></div><div>engine=3D# select * from luns;<br></div><div><br>= </div><div>engine=3D# delete from luns where physical_volume_id =3D 'IqOdm6= -BWuT-9YBW-uvM1-q41E-a3Cz-zPnWHq';<br>engine=3D# delete from lun_storage_se= rver_connection_map where storage_server_connection=3D'1b9f3167-3236-431e-9= 3c2-ab5ee18eba04';<br>engine=3D# delete from lun_storage_server_connection_= map where storage_server_connection=3D'ea5971f8-e1a0-42e3-826d-b95e9031ce53= ';<br>engine=3D# delete from storage_server_connections where id=3D'1b9f316= 7-3236-431e-93c2-ab5ee18eba04';<br>engine=3D# delete from storage_server_co= nnections where id=3D'ea5971f8-e1a0-42e3-826d-b95e9031ce53';<br></div><div>= <br></div><div><br>delete remaining disk(s) ; I had 1 virtual disk on this = storage<br></div><div><br></div><div>engine=3D# delete from base_disks wher= e disk_id=3D'03d651eb-14a9-4dca-8c87-605f101a5e0c';<br>engine=3D# delete fr= om permissions where object_id=3D'03d651eb-14a9-4dca-8c87-605f101a5e0c';<br= </div><div><br></div><div><br>Then started engine and all is fine now.<br>= </div><div><br></div><div><br></div><div><br></div><div>----- Mail original= -----<br>> De: "Amit Aviram" <aaviram@redhat.com><br>> =C3=80:= "Olivier Navas" <olivier.navas@sdis33.fr><br>> Envoy=C3=A9: Mardi= 6 Janvier 2015 17:24:19<br>> Objet: Re: [ovirt-users] Can't remove a st= orage domain related to a broken &= nbsp;hardware<br>> <br>> <br>> <br>> ----- Original Message ---= --<br>> From: "Olivier Navas" <olivier.navas@sdis33.fr><br>> Hi= , can you please add the engine log?<br>> <br>> To: users@ovirt.org<b= r>> Sent: Tuesday, January 6, 2015 11:28:42 AM<br>> Subject: [ovirt-u= sers] Can't remove a storage domain related to a broken<br>>  = ; hardware<br>> <br>> <br>> Hel= lo Ovirt users !<br>> <br>> I experienced an hardware failure on a IS= CSI storage making it unrecoverable,<br>> and I would like to remove it = from storage domains.<br>> <br>> There was 1 disk on this storage dom= ain, and this disk isn't attached to any<br>> VM anymore, but I still ca= n't detach this storage domain from cluster.<br>> <br>> The storage d= omain is in "inactive" status and if I try to "detach" it from<br>> data=
> <br>> I am running an Ovirt 3.5 cluster (engine with CentOS 6.6, 4= nodes with<br>> CentOS 7) with FC and ISCSI storage domains.<br>> <b= r>> Thanks for your help.<br>> <br>> <br>> <br>> <br>> Ce= courriel et tous les fichiers attach=C3=A9s qu'il contient sont confidenti= els<br>> et destin=C3=A9s exclusivement =C3=A0 la personne =C3=A0 laquel= le ils sont adress=C3=A9s. Si<br>> vous avez re=C3=A7u ce courriel par e= rreur, merci de le retourner =C3=A0 son<br>> exp=C3=A9diteur et de le d= =C3=A9truire. Il est rappel=C3=A9 que tout message =C3=A9lectronique<br>>= ; est susceptible d'alteration au cours de son acheminement sur internet.<b= r>> Seuls les documents officiels du SDIS sont de nature =C3=A0 engager = sa<br>> responsabilit=C3=A9. Les id=C3=A9es ou opinions pr=C3=A9sent=C3= =A9es dans ce courriel sont<br>> celles de son auteur et ne repr=C3=A9se= ntent pas n=C3=A9cessairement celles du SDIS de<br>> la Gironde.<br>>= <br>> _______________________________________________<br>> Users mai=
=0A--=0ACe courriel et tous les fichiers attach=C3=A9s qu'il contient sont = confidentiels et destin=C3=A9s exclusivement =C3=A0 la personne =C3=A0 laque= lle ils sont adress=C3=A9s. Si vous avez re=C3=A7u ce courriel par erreur, m= erci de le retourner =C3=A0 son exp=C3=A9diteur et de le d=C3=A9truire. Il e= st rappel=C3=A9 que tout message =C3=A9lectronique est susceptible d'alterat= ion au cours de son acheminement sur internet. Seuls les documents officiels= du SDIS sont de nature =C3=A0 engager sa responsabilit=C3=A9. Les id=C3=A9e= s ou opinions pr=C3=A9sent=C3=A9es dans ce courriel sont celles de son auteu= r et ne repr=C3=A9sentent pas n=C3=A9cessairement celles du SDIS de la Giron= de.=0A ------=_Part_1573992_482995922.1421055717805 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><body><div style=3D"font-family: times new roman, new york, times, se= rif; font-size: 12pt; color: #000000"><div><br>Hi !<br></div><div><br></div= the sql queries I executed in postgres (with engine stopped while executing= them) in order to remove storage domain. Maybe it can be useful for somebo= dy else in the same situation.<br></div><div><br></div><div><br>Connect to = database<br></div><div><br></div><div># su - postgres<br># psql engine<br><= /div><div><br></div><div><br>identify broken storage <br></div><div><br></d= iv><div>engine=3D# select id, storage_name from storage_domain_static;<br>&= nbsp; id  = ; | &n= bsp;storage_name <br>----------------------------------= ----+------------------------<br> 34c95a44-db7f-4d0f-ba13-5f06a7feefe7= | my-broken-storage-domain<br></div><div><br></div><div><br></div><div><br= center, ovirt tries to activate it. Obviously it can't activate it<br>>= since hardware is broken, and it fails after several minutes with the even= t<br>> "Failed to detach Storage Domain my_storage_domain to Data Center= Default.<br>> (User: admin)". I can post my engine.log if useful.<br>&g= t; <br>> I need a way to force removal of this storage domain. Any trick= would be<br>> greatly appreciated.<br>> <br>> Perhaps does Ovirt = miss some sort of "force detach, i know what i'm doing"<br>> button ?<br= ling list<br>> Users@ovirt.org<br>> http://lists.ovirt.org/mailman/li= stinfo/users<br>> <br></div></div> <br>= =0A<hr><font size=3D"-2"><em>=0ACe courriel et tous les fichiers attach=C3= =A9s qu'il contient sont confidentiels et destin=C3=A9s exclusivement =C3=A0= la personne =C3=A0 laquelle ils sont adress=C3=A9s. Si vous avez re=C3=A7u = ce courriel par erreur, merci de le retourner =C3=A0 son exp=C3=A9diteur et = de le d=C3=A9truire. Il est rappel=C3=A9 que tout message =C3=A9lectronique = est susceptible d'alteration au cours de son acheminement sur internet. Seul= s les documents officiels du SDIS sont de nature =C3=A0 engager sa responsab= ilit=C3=A9. Les id=C3=A9es ou opinions pr=C3=A9sent=C3=A9es dans ce courriel= sont celles de son auteur et ne repr=C3=A9sentent pas n=C3=A9cessairement c= elles du SDIS de la Gironde.=0A</font></em>=0A <br>= </body></html> ------=_Part_1573992_482995922.1421055717805--
participants (1)
-
Olivier Navas