{"id":7469,"date":"2014-06-19T04:00:15","date_gmt":"2014-06-19T04:00:15","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/19\/simulating-a-missing-superblock-error-on-ext4-linux-system-collection-of-common-programming-errors\/"},"modified":"2014-06-19T04:00:15","modified_gmt":"2014-06-19T04:00:15","slug":"simulating-a-missing-superblock-error-on-ext4-linux-system-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/19\/simulating-a-missing-superblock-error-on-ext4-linux-system-collection-of-common-programming-errors\/","title":{"rendered":"Simulating a missing superblock error on EXT4 linux system-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to write reference material for a friend who has power outages a couple of times a year which affect their linux server. This person is not well versed in linux systems administration, so I want to include screenshots and a fairly comprehensive description of what to expect, and how to respond.<\/p>\n<p>One of the more common questions that comes up (a couple times a year; they&#8217;re in a lightning-prone area) is how to recover from a corrupt or missing superblock in the root filesystem.<\/p>\n<p>I have documentation on how to fix the problem, but it assumes you have a nodding acquaintance with linux and console-based systems administration. What I&#8217;d like to do is setup a KVM on my server, crash the root filesystem on purpose, and take screenshots of the initial discovery along with the steps to recover.<\/p>\n<p>I cannot seem to trigger that missing\/corrupt superblock issue. I&#8217;ve been trying things like:<\/p>\n<p>(\/dev\/sda2 is where the root LVM partition lives) dd if=\/dev\/zero of=\/dev\/sda2 bs=1024 count=1 seek=1<\/p>\n<p>(\/dev\/mapper\/vg_sys-lv_root is the root LVM partition) dd if=\/dev\/zero of=\/dev\/mapper\/vg_sys-lv_root bs=4096 count=1<\/p>\n<p>Neither of these work; they both seem to create mayhem, but in very different ways from the run-of-the-mill missing\/corrupt superblock.<\/p>\n<p>Is there any way to simulate this scenario on a KVM guest (i.e. without setting up a machine and then pulling the power cord out of it)?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to write reference material for a friend who has power outages a couple of times a year which affect their linux server. This person is not well versed in linux systems administration, so I want to include screenshots and a fairly comprehensive description of what to expect, and how to respond. One of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7469","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7469"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7469\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}