{"id":36,"date":"2005-12-08T15:53:49","date_gmt":"2005-12-08T20:53:49","guid":{"rendered":"http:\/\/elegans.uky.edu\/blog\/?p=36"},"modified":"2005-12-08T15:53:49","modified_gmt":"2005-12-08T20:53:49","slug":"raid1-recovery","status":"publish","type":"post","link":"http:\/\/jimlund.org\/blog\/?p=36","title":{"rendered":"RAID1 recovery"},"content":{"rendered":"<p>One of the MA database systems went down.  It wouldn&#8217;t boot, so we put in the install disk, &#8216;linux rescue&#8217; at the prompt, and it booted into rescue mode.  The system is set up with the system files on a pair of RAID1 SATA drives.  Drive \/dev\/sda was gone&#8211;fdisk found no partition.  \/dev\/sdb was fine.  I looked around for hacking traces but found nothing.  \/var\/log\/messages indicated the system had shutdown for reboot two days before.  We hadn&#8217;t done it, so how\/why? <\/p>\n<p>First, I re-partitioned \/dev\/sda to look like \/dev\/sdb using the same &#8216;fd&#8217; RAID partition type.<\/p>\n<p>To bring it back up, I shut down, switched the sda and sdb cables so we could boot off the good drive and then have RAID restore the second drive.  The original \/dev\/sdb didn&#8217;t have grub installed on the MBR, so I had to reboot with the rescue disk and reinstall grub.<\/p>\n<p><code><br \/>\n\/mnt\/sysimage\/sbin\/grub<br \/>\ngrub>root (hd0,0)<br \/>\ngrub>setup (hd0)<br \/>\n<\/code><\/p>\n<p>I had to use grub because grub-install wasn&#8217;t available from the rescue environment and \/mnt\/sysimage\/sbin\/grub-install couldn&#8217;t find \/sbin\/grub.<\/p>\n<p>Then reboot, grub comes up, the system boots.  The root \/dev\/md1 RAID1 is degraded as this shows, so add \/dev\/sdb back:<\/p>\n<p><code><br \/>\nmdadm --query --detail \/dev\/md1<br \/>\n...degraded...<\/p>\n<p>mdadm --add \/dev\/md1 \/dev\/sdb<br \/>\n<\/code><\/p>\n<p>And 20 minutes later the array is clean!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the MA database systems went down. It wouldn&#8217;t boot, so we put in the install disk, &#8216;linux rescue&#8217; at the prompt, and it booted into rescue mode. The system is set up with the system files on a pair of RAID1 SATA drives. Drive \/dev\/sda was gone&#8211;fdisk found no partition. \/dev\/sdb was fine. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":0,"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"wp:attachment":[{"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jimlund.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}