{"id":20,"date":"2007-10-01T10:49:44","date_gmt":"2007-10-01T02:49:44","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/?p=20"},"modified":"2007-10-01T10:49:44","modified_gmt":"2007-10-01T02:49:44","slug":"checking-and-repairing-file-system-with-fsck","status":"publish","type":"post","link":"https:\/\/www.sysadmindayph.com\/blog\/checking-and-repairing-file-system-with-fsck\/","title":{"rendered":"Checking and Repairing File system with fsck"},"content":{"rendered":"<p><strong>fsck<\/strong> is the command used in UNIX for checking filesystem for any inconsistencies, usually caused by abnormal shutdown. These abnormal shutdown may be caused by some hardware failure or power failure.<\/p>\n<p>fsck also\u00a0has options to repair filesystem as well.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<blockquote><p><strong><font face=\"Times New Roman\">fsck<\/font><\/strong><font face=\"Times New Roman\">\u00a0 [ <strong>-F<\/strong> <em>fstype<\/em>]\u00a0 [<strong>-V<\/strong>]\u00a0\u00a0\u00a0 [<strong>-y<\/strong>Y]\u00a0\u00a0\u00a0 [<strong>-o<\/strong> <em>options<\/em>]\u00a0 <em>special<\/em><\/font><\/p>\n<p><strong><font face=\"Times New Roman\">-F<\/font><\/strong><font face=\"Times New Roman\"> <em>fstype<\/em>\u00a0\u00a0\u00a0\u00a0 type of file system to be repaired ( ufs , vxfs etc)<\/font><\/p>\n<p><strong><font face=\"Times New Roman\">-V<\/font><\/strong><font face=\"Times New Roman\"> verify the command line syntax but do not run the command\u00a0<\/font><\/p>\n<p><strong><font face=\"Times New Roman\">-y<\/font><\/strong><font face=\"Times New Roman\"> or -Y\u00a0 Run the command in non interactive mode &#8211; repair all errors encountered without waiting for user response.<\/font><\/p>\n<p><strong><font face=\"Times New Roman\">-o<\/font><\/strong><font face=\"Times New Roman\"> <em>options\u00a0 <\/em>Three options can be\u00a0 specified with -o flag<\/font><\/p>\n<p><strong><font face=\"Times New Roman\">b=<\/font><\/strong><font face=\"Times New Roman\"><em><strong>n<\/strong>\u00a0\u00a0<\/em> where n is the number of next super block\u00a0 if primary super block is corrupted in a file system .<\/font><\/p>\n<p><strong><font face=\"Times New Roman\">p<\/font><\/strong><font face=\"Times New Roman\"> option used to make safe repair options during the\u00a0 booting process.<\/font><\/p>\n<p><strong><font face=\"Times New Roman\">f\u00a0<\/font><\/strong><font face=\"Times New Roman\">\u00a0\u00a0 force the file system check regardless of its clean flag.<\/font><\/p><\/blockquote>\n<p>Most\u00a0 *NIX machines has fsck, but special attention should be made when dealing with Sparc hardware or Solaris UNIX in general.<\/p>\n<p>When doing fsck, make sure that you are checking the &#8216;raw&#8217; device and not just the logical disk.<\/p>\n<p>Check <a href=\"http:\/\/www.joho.com\/sun\/ch04\/131-133.html\">this out <\/a>to determine the raw device of a solaris server. We&#8217;ll post more of the topic soon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>fsck is the command used in UNIX for checking filesystem for any inconsistencies, usually caused by abnormal shutdown. These abnormal shutdown may be caused by some hardware failure or power failure. fsck also\u00a0has options to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,7,5,3],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-commands","category-operating-system","category-solaris","category-unix"],"_links":{"self":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}