{"id":167,"date":"2013-09-03T20:05:00","date_gmt":"2013-09-03T20:05:00","guid":{"rendered":"http:\/\/214@jodohost.com\/\/blog\/"},"modified":"2013-09-03T20:05:00","modified_gmt":"2013-09-03T20:05:00","slug":"how-to-check-for-bad-sectors-on-a-drive-and-repair-them","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2013\/09\/03\/how-to-check-for-bad-sectors-on-a-drive-and-repair-them\/","title":{"rendered":"How to check for bad sectors on a drive and repair them"},"content":{"rendered":"<p>A bad sector is a sector on a disk drive or in memory that cannot be used due to permanent damage or an OS inability to access it. <\/p>\n<p>Badblocks is a Linux utility that one can use to find out the bad sectors on a disk drive.<\/p>\n<p>For ex- <\/p>\n<p>badblocks -v \/dev\/vda2<\/p>\n<p>We will thus see the badblocks on the disk drive. Also we can redirect the output to the file as well:-<\/p>\n<p>badblocks -v \/dev\/vda2 > bad-sectors<\/p>\n<p>Once we&#8217;ll know about the bad sectors in the drive, we can try to fix\/repair the errors using the file system check utilities of Linux like the e2fsck command below :- <\/p>\n<p>e2fsck -y \/dev\/vda2<\/p>\n<p>Note: However, it is always recommended to use e2fsck only when you have unmounted the disk drive in the single-user mode, otherwise there will be possibilities of data loss at that time.<\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A bad sector is a sector on a disk drive or in memory that cannot be used due to permanent damage or an OS inability to access it. Badblocks is a Linux utility that one can use to find out the bad sectors on a disk drive. For ex- badblocks -v \/dev\/vda2 We will thus [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/167"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":0,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}