{"id":33,"date":"2005-09-07T14:04:59","date_gmt":"2005-09-07T14:04:59","guid":{"rendered":"http:\/\/blog.bananasplit.info\/?p=33"},"modified":"2005-09-07T14:15:40","modified_gmt":"2005-09-07T14:15:40","slug":"debian-raid-boot","status":"publish","type":"post","link":"https:\/\/blog.stmellion.org\/?p=33","title":{"rendered":"Debian RAID boot"},"content":{"rendered":"<p><strong>Create a RAID1 array using only a single active disk<\/strong><br \/>\n# mdadm &#8211;create \/dev\/md0 &#8211;level 1 &#8211;raid-devices=2 missing \/dev\/hda1<br \/>\n# mkfs.ext3 \/dev\/md0<br \/>\n<em>Where hda1 is a new partition destined to become a second boot partition.<\/em><\/p>\n<p><strong>Copy the \/boot content to the new volume<\/strong><br \/>\n# mkdir \/root\/boot<br \/>\n# mount \/dev\/md0 \/root\/boot<br \/>\n# cp -rp \/boot\/* \/root\/boot<\/p>\n<p><strong>Make a partition bootable<\/strong><br \/>\n#grub &#8211;device-map=\/boot\/grub\/device.map<\/p>\n<p>>> root (hd0,0)<br \/>\n>> setup (hd0)<br \/>\n>> quit <\/p>\n<p>Where (hd0,0) is disk0,partition0.  (hd1,0) would be disk1,partition0.<br \/>\n<em>Note: I find it useful to keep in mind that systems do not boot from an RAID array.  They boot from disks that can be members of a RAID array.  The mirroring only comes into effect once the system has booted, until then they are two bootable partitions with no knowledge of each other.<\/em><\/p>\n<p><strong>Add an additional disk to an already existing RAID1 array<\/strong><br \/>\n# mdadm \/dev\/md0 &#8211;add \/dev\/hdb1<br \/>\n<em>Where hdb1 is the old boot partition being replaced by md0.  The command will overwrite the content of hdb1 with the existing md0 content.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to make a Debian RAID&#8217;ed boot partition using grub<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-debian","entry"],"_links":{"self":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":0,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}