<div><div>Weird. The RHV4 guides not contain the information that we need to clean the database from old storage domain before running the command engine-setup.</div><div>What specific actions do we need?</div><div>Eventually I want to get a full recovery plan at the moment for oVirt 4.0.</div></div><div> </div><div>05.10.2016, 12:07, "Simone Tiraboschi" &lt;stirabos@redhat.com&gt;:</div><blockquote type="cite"><div> <div> <div>On Wed, Oct 5, 2016 at 10:30 AM, <span>&lt;<a href="mailto:aleksey.maksimov@it-kb.ru" target="_blank">aleksey.maksimov@it-kb.ru</a>&gt;</span> wrote:<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid;">Well.<br />Then, in the case of conditions:<br /><br />1) the vm is not available anymore due to storage corruption<br />2) an empty shared storage is available<br />3) engine backup exists<br />4) all VMs still running on the hosts in the cluster<br /><br /><br />The recovery plan will be like this (as I understand it):<br /><br /><br />1) On all the hosts (if they are still available):<br /><br /># service ovirt-ha-broker stop<br /># service ovirt-ha-agent stop<br /># chkconfig --del ovirt-ha-broker<br /># chkconfig --del ovirt-ha-agent<br /><br /><br />2) On first host (if the original host is not available anymore, provision a new host from scratch and proceed on this new host):<br /><br />  2.1) # hosted-engine --deploy<br /><br /> ◾use same fqdn you had previously in the HE VM.<br /> ◾point to the new shared storage<br /> ◾provide the same admin password you used in previous setup<br /> ◾install the OS on the vm</blockquote><div> </div><div>I'd suggest to use the engine appliance also for this.</div><div>You can just say No when it asks about automatically running engine-setup.</div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid;">  ◾confirm it has been installed<br /><br /> on Hosted Engine VM:<br /><br />  a) Install the ovirt-engine rpms on the vm but don't run engine-setup:<br />  # yum install <a href="http://resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm" target="_blank">http://resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm</a><br />  # yum install epel-release<br />  # yum install ovirt-engine<br />  b) Restore the backup:<br />  # engine-backup --mode=restore --file=file_name --log=log_file_name --provision-db --provision-dwh-db --restore-permissions</blockquote><div> </div><div>In order to let the engine auto-import the new hosted-engine storage domain, you have to remove the old one.</div><div>The same for the engine VM. Unfortunately you cannot do that from the engine since they are somehow protected to avoid unintentional damages.</div><div>The easiest way is to remove them from the DB before running engine-setup.</div><div>I'm working on a helper utility to make it easiser:</div><div><a href="https://gerrit.ovirt.org/#/c/64966/">https://gerrit.ovirt.org/#/c/64966/</a></div><div>I think I'll integrate it with engine-backup to simply do it with an additional CLI flag.</div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid;">   c) Run "engine-setup"<br /><br />   2.2) Open Administration Portal and remove the all old hosts used for Hosted Engine</blockquote><div> </div><div>Right, we can also integrate this step in the HE cleaning helper.</div><div> </div> <blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid;">   2.3) Confirm that the engine has been installed (Return to the host and continue the hosted-engine deployment script by selecting option 1) and then finish the deploy.<br /><br />   2.4) In Administration Portal activate new host<br /><br /><br />3) On all additional hosts run "hosted-engine --deploy".</blockquote><div> </div><div>I strongly suggest to deploy them from the engine and not from CLI.</div><div>CLI deploy support for additional HE host is deprecated an it will be removed in 4.1.</div><div> </div><br /><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid;">Right?</blockquote></div></div></div></blockquote>