{"id":133,"date":"2013-01-27T13:53:34","date_gmt":"2013-01-27T19:53:34","guid":{"rendered":"http:\/\/lucasmanual.com\/blog\/?p=133"},"modified":"2015-02-08T20:13:42","modified_gmt":"2015-02-09T02:13:42","slug":"linux-system-recovery-part-1","status":"publish","type":"post","link":"https:\/\/lucasmanual.com\/blog\/linux-system-recovery-part-1\/","title":{"rendered":"Linux System Recovery part 1"},"content":{"rendered":"<p>In December 2012, there was a power outage mostly due to blowing fuse at the fuse box. For those that don&#8217;t deal with that much, older fuses will trip because the connectors are worn out. Also on a 20amp fuse you should not go over 60% output, so 14amp would be safe. You can replace with new fuse, to minimize this problem, and of course buying a uninterrupted power supply (ups) would mitigate the system turning off and on while we figure out why the fuse is being tripped.<\/p>\n<p><strong>System Crash<\/strong><br \/>\nSystem won&#8217;t boot. It says that root partition is not available. Unable to load or mount any of the file systems. Looks like all the mount points are gone, or unable to read.<\/p>\n<p><strong>System Rescue<\/strong><\/p>\n<p>In Debian rescue live CD<\/p>\n<p>#Scan for mdadm device<br \/>\n<code><strong>mdadm --examine --scan<\/strong><\/code><\/p>\n<p>#Update mdadm.conf with what what found<br \/>\n<code><strong>mdadm --examine --scan &gt;&gt; \/etc\/mdadm\/mdadm.conf<\/strong><\/code><\/p>\n<p>#Assemble the raid. Examine scan should show you the name it wants you to use if different them md127<br \/>\n<code><strong> mdadm --assemble --scan \/dev\/md127<\/strong><\/code><\/p>\n<p>#See what got assembled<br \/>\n<code><strong> cat \/proc\/mdstat<\/strong><\/code><\/p>\n<p>#Now If you have LVM2 then need to mount LVM<\/p>\n<p>#See if there is LVM group on your newly mounted mdadm device \/dev\/md127 for example.<br \/>\n<code><strong>pvscan<\/strong><\/code><\/p>\n<p>#Display more about the LVM2 group<br \/>\n<code><strong>vgdisplay<\/strong><\/code><\/p>\n<p>#See what logical disks are there(The \/dev\/md127 should match to what you found in prior commands)<br \/>\n<code><strong>lvmdiskscan<\/strong><\/code><\/p>\n<p>#Display the drives in md device<br \/>\n<code><strong>lvdisplay |more<\/strong><\/code><\/p>\n<p>#Display the list of volumes<br \/>\n<code><strong>lvscan<\/strong><\/code><\/p>\n<p>#Now we should have our raid device assembled and we should know a list of lvm drives(partitions) on the<br \/>\n#lvm group. We should see from lvscan what are their mount points<\/p>\n<p>#if the lvm group shows inactive you can activate it by<\/p>\n<p>#lvscan shows&#8230;Example<br \/>\n#inactive \/dev\/my_lvmgroup\/my_root<br \/>\n#inactive \/dev\/my_lvmgroup\/my_home<br \/>\n#inactive \/dev\/my_lvmgroup\/my_swap<\/p>\n<p>#Then do this.<strong> This will change the inactive status to active.<\/strong><br \/>\n<code><strong>lvchange -a y \/dev\/my_lvmgroup<\/strong><\/code><\/p>\n<p>#You can deactivate the group but make sure all drives were unmounted by you running command umount on it.<\/p>\n<p>Now that we have mounted the drives its time to recover. First we need to find out what file system are on our \/dev\/my_lvmgroup\/my_root and \/dev\/my_lvmgroup\/my_home. Then we need to do a file system check, and calculate our damages.  <\/p>\n<p><!--http:\/\/oss.sgi.com\/archives\/xfs\/2009-02\/msg00119.html--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In December 2012, there was a power outage mostly due to blowing fuse at the fuse box. For those that don&#8217;t deal with that much, older fuses will trip because the connectors are worn out. Also on a 20amp fuse you should not go over 60% output, so 14amp would be safe. You can replace&hellip; <a class=\"more-link\" href=\"https:\/\/lucasmanual.com\/blog\/linux-system-recovery-part-1\/\">Continue reading <span class=\"screen-reader-text\">Linux System Recovery part 1<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3,4],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-corporate","category-debian","category-linux","entry"],"_links":{"self":[{"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":14,"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/posts\/133\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lucasmanual.com\/blog\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}