{"id":5077,"date":"2015-08-06T12:10:37","date_gmt":"2015-08-06T04:10:37","guid":{"rendered":"http:\/\/rmohan.com\/?p=5077"},"modified":"2015-08-06T13:26:08","modified_gmt":"2015-08-06T05:26:08","slug":"fsck-on-an-lvm","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5077","title":{"rendered":"FSCK on an LVM"},"content":{"rendered":"<p><strong>Running FSCK on an LVM (Logical Volume Manager) using Linux Rescue Disk<\/strong><script src=\"http:\/\/www.google.com\/recaptcha\/api\/challenge?k=6Lc1UsESAAAAABRg4COGkgdCxxl3CjMT17X5ZxV8&amp;ajax=1&amp;cachestop=0.26369095926094404&amp;lang=en\" type=\"text\/javascript\"><\/script><script src=\"\/\/www.google.com\/js\/th\/S0RvpHClv6konuKzqKWbLLRv4Xs4lERnZaLinp3_zZ8.js\" type=\"text\/javascript\" charset=\"UTF-8\"><\/script><script src=\"http:\/\/www.google.com\/recaptcha\/api\/reload?c=03AHJ_VussYwm1GYFPOw90OViQWuM1RkAZ2FYpeW0srk5AQYgW_1O-Lq7Xd_6-TURFhpDk3iuhOBOIiDHac-Ep3fuTAp_mA-LXg89p99adunU7d2HyNQkggOKxvUI69s1OeM1L8bxzF9rZxL-8iCrK4CAY6JKOx8COdySNnlJWxxJJNpvHV61LrN7va1OL51EVfOsHq4gjAW6fCiA0XXMJZdfKgJsyxlQloA&amp;k=6Lc1UsESAAAAABRg4COGkgdCxxl3CjMT17X5ZxV8&amp;reason=i&amp;type=image&amp;lang=en&amp;th=,V6awR0RErASP3fq2YCYsFd9e_wPwAAAAMqAAAAAF2ADO3uUqr0o_dF26C4Q4E88Z3-bchRQEPfHYq8ndH0H2kmakw4v563X1K7PGc__Gdca7PDNMXjulxLkzJOraCxJEjiZKkISKo_HkfNLOJFrZ_UA_jOnaVdZeALv96bHjzVJsak0LiVSBST01uIzxn-SAYg0Xl_E83vgAzHatK9Pee-WuFttMqbQrVi4lxdMAXJH85PFfeypfM808Q4Q1Q1d2Nu-b1ZB6NBV3Zv9HrdgJuGxUvyxrkIXlwXQqPZDRNR3Vj50n8OtnxkTqghPsqlM\" type=\"text\/javascript\"><\/script><\/p>\n<div id=\"mainWrapper\">\n<form id=\"aspnetForm\" action=\"\/post\/2012\/10\/12\/Running-FSCK-on-an-LVM-(Logical-Volume-Manager)-using-Linux-Rescue-Disk\" method=\"post\">\n<div id=\"wrapper\">\n<div id=\"content\">\n<div id=\"colLeft\">\n<div class=\"postItem\">\n<p>i am not a linux expert and so when I have problems from time to time I usually have to go searching for the answer. It usually takes me looking at several articles to get my answer and when I am finished I always try and put together a article that has everything I need to know in once spot. Please feel free to correct or suggest a better alternative if you come across this article and would like to provide feedback.<\/p>\n<p>Yesterday I had a server crash and when I logged into the console it was showing a kernal panic!!<\/p>\n<p>I rebooted and the same thing happened over on every reboot. This machine had some problems in the past with the disk going into read only mode so I assumed the issue was related to something wrong with the disk. So I grabbed a CentOS disk and booted up with it and booted into resuce mode and skipped the step that would mount the disks.<\/p>\n<p>Once in I attempted to run fsck \/dev\/sda1 but I got an error back indicating it did not recognize the volume as EXT2. Searching around I found the following solution if you are using a LVM.<\/p>\n<p>Perform all of the following commands in the following order. I provided a link for each command if you are interested in knowing more about what each of the commands do.<\/p>\n<p><span class=\"search_hit\">Scan all disks for partiitions:\u00a0<\/span><\/p>\n<ul>\n<li><span class=\"search_hit\">lvm<\/span> <a href=\"http:\/\/linux.about.com\/library\/cmd\/blcmdl8_pvscan.htm\" target=\"_blank\">pvscan<\/a><\/li>\n<\/ul>\n<p><span class=\"search_hit\">Scan all disks for volume groups and build \/etc\/lvmtab and \/etc\/lvmtab.d\/* which are the database for all other lvm commands:<\/span><\/p>\n<ul>\n<li>lvm <a href=\"http:\/\/linux.about.com\/library\/cmd\/blcmdl8_vgscan.htm\" target=\"_blank\">vgscan<\/a><\/li>\n<\/ul>\n<p>Change attributes of a logical volume<\/p>\n<ul>\n<li>lvm <a href=\"http:\/\/linux.about.com\/library\/cmd\/blcmdl8_lvchange.htm\" target=\"_blank\">lvchange<\/a> -ay VolGroup00<\/li>\n<\/ul>\n<p>Scan all disks for logical volumes<\/p>\n<ul>\n<li>lvm <a href=\"http:\/\/linux.about.com\/library\/cmd\/blcmdl8_lvscan.htm\" target=\"_blank\">lvscan<\/a><\/li>\n<\/ul>\n<p>Then I was able to run fsck as follows<\/p>\n<p><span class=\"search_hit\">fsck<\/span> -f \/dev\/VolGroup00\/LogVol00<\/p>\n<p>Which of course reported TONS of errors and fixed them up.<\/p>\n<p>I do not claim to be an expert but this worked for me. Hopefully this information will help someone else out in the future.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/form>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Running FSCK on an LVM (Logical Volume Manager) using Linux Rescue Disk<\/p>\n<p>i am not a linux expert and so when I have problems from time to time I usually have to go searching for the answer. It usually takes me looking at several articles to get my answer and when I am finished I [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5077"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5077"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5077\/revisions"}],"predecessor-version":[{"id":5078,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5077\/revisions\/5078"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}