{"id":1650,"date":"2022-01-26T08:55:00","date_gmt":"2022-01-26T08:55:00","guid":{"rendered":"https:\/\/www.qworqs.com\/?p=1650"},"modified":"2022-09-30T17:47:45","modified_gmt":"2022-09-30T17:47:45","slug":"resume-bad-blocks-where-it-was-stopped","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2022\/01\/26\/resume-bad-blocks-where-it-was-stopped\/","title":{"rendered":"Resume bad blocks where it was stopped"},"content":{"rendered":"\n<p>The answer to this should be simple, I initiated the test with <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">badblocks -nsv \/dev\/sdb<\/pre>\n\n\n\n<p>, first, interrupt bad blocks with ctrl+c, the output should be<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Checking for bad blocks in non-destructive read-write mode\nFrom block 0 to 1953514583\nChecking for bad blocks (non-destructive read-write test)\nTesting with random pattern:   0.92% done, 49:38 elapsed. (0\/0\/0 errors)\n 21.32% done, 18:49:24 elapsed. (0\/0\/0 errors)\n\nInterrupted at block 416437376\n\nInterrupt caught, cleaning up<\/pre>\n\n\n\n<p>Okay, so we know what blocks it was supposed to check (1 through 1953514583), and where it was interrupted (416437376)<\/p>\n\n\n\n<p>So i will ask it to resume testing from where it finished (-1), up to the end<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">badblocks -nsv \/dev\/sdb 1953514583 416437375\n\nn = Non destructive\ns = Show progress\nv = tell us about what you find !<\/pre>\n\n\n\n<p>The new run should tell you the percentage correctly, but the time counter will be reset to zero, as it is only counting how long this run has been running for<\/p>\n\n\n\n<p>One thing to note is that bad blocks can be used to instruct the filesystem to avoid the bad blocks, but it also allows the disk&#8217;s firmware to substitute bad blocks with spare blocks, so that the disk works again with no intervention from your end !<\/p>\n\n\n\n<p>So for my 2TB hard drive&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">416437375 = 21% (13 hours)\n619014719 = 31.6% (+23:22)\n627995199 = 32.15% (+1:04)\n667782398 = 34.18% (+4:46)\n715469885 = 36.62% (+5:44)\n827834875 = 42.38%\n<\/pre>\n\n\n\n<p>While running the tests, you might want to keep an eye on the hard drive temperature with a command like<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">hddtemp \/dev\/sdb<\/pre>\n\n\n\n<p>To create a log file of the bad blocks, every run should have it&#8217;s own file !<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">badblocks -nsv -o \/root\/badblocks3.txt \/dev\/sdb 1953514583 627995198<\/pre>\n\n\n\n<p>The concatenation of those files you are creating is very useful in creating a file system if you ever decide to format the drive later !, but the recommended way is using badblocks with the other disk tools directly<\/p>\n\n\n\n<p>while the test is running, you will see 3 numbers that correspond to <strong>readerror\/writeerror\/corruptionerror<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The answer to this should be simple, I initiated the test with badblocks -nsv \/dev\/sdb , first, interrupt bad blocks with ctrl+c, the output should be Checking for bad blocks in non-destructive read-write mode From block 0 to 1953514583 Checking for bad blocks (non-destructive read-write test) Testing with random pattern: 0.92% done, 49:38 elapsed. (0\/0\/0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,4],"tags":[],"class_list":["post-1650","post","type-post","status-publish","format-standard","hentry","category-hard-disks","category-linux"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=1650"}],"version-history":[{"count":11,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1650\/revisions"}],"predecessor-version":[{"id":1668,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/1650\/revisions\/1668"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=1650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=1650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=1650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}