<div dir="ltr">Hello,<div><br></div><div>Here is a start of the discussion - <a href="http://lists.openstack.org/pipermail/openstack-dev/2015-December/083021.html">http://lists.openstack.org/pipermail/openstack-dev/2015-December/083021.html</a> . I've subscribed to this mailing list later, so can reply there.</div><div><br></div><div>Currently we clear node's disks in two places. The first one is before reboot into bootstrap image [0] and the second - just before provisioning in fuel-agent [1].</div><div><br></div><div>There are two problems, which should be solved with erasing first megabyte of disk data: node should not boot from hdd after reboot and new partitioning scheme should overwrite the previous one.</div><div><br></div><div>The first problem could be solved with zeroing first 512 bytes of each disk (not partition). Even 446 to be precise, because last 66 bytes are partition scheme, see <a href="https://wiki.archlinux.org/index.php/Master_Boot_Record">https://wiki.archlinux.org/index.php/Master_Boot_Record</a> .</div><div><br></div><div>The second problem should be solved only after reboot into bootstrap. Because if we bring a new node to the cluster from some other place and boot it with bootstrap image it will possibly have disks with some partitions, md devices and lvm volumes. So all these entities should be correctly cleared before provisioning, not before reboot. And fuel-agent does it in [1].<br></div><div><br></div><div>I propose to remove erasing first 1M of each partiton, because it can lead to errors in FS kernel drivers and kernel panic. An existing workaround, that in case of kernel panic we do reboot is bad because it may occur just after clearing first partition of the first disk and after reboot bios will read MBR of the second disk and boot from it instead of network. Let's just clear first 446 bytes of each disk.</div><div><br></div><div><br clear="all"><div>[0] <a href="https://github.com/openstack/fuel-astute/blob/master/mcagents/erase_node.rb#L162-L174">https://github.com/openstack/fuel-astute/blob/master/mcagents/erase_node.rb#L162-L174</a><br></div><div>[1] <a href="https://github.com/openstack/fuel-agent/blob/master/fuel_agent/manager.py#L194-L221">https://github.com/openstack/fuel-agent/blob/master/fuel_agent/manager.py#L194-L221</a><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dmitry Guryanov<br></div></div>
</div></div>