Allow recovery from interrupted `badblocks -n`What are the pros and cons of badblock's two non-destructive...

How many times can you cast a card exiled by Release to the Wind?

Traffic law UK, pedestrians

How Can I Tell The Difference Between Unmarked Sugar and Stevia?

Etymology of 'calcit(r)are'?

What LISP compilers and interpreters were available for 8-bit machines?

Trapping Rain Water

Payment instructions from HomeAway look fishy to me

Turing patterns

My coworkers think I had a long honeymoon. Actually I was diagnosed with cancer. How do I talk about it?

Where does this pattern of naming products come from?

Question about JavaScript Math.random() and basic logic

What do we gain with higher order logics?

siunitx error: Invalid numerical input

Avoiding cliches when writing gods

Is any name of Vishnu Siva?

Phone number to a lounge, or lounges generally

Are "living" organ banks practical?

Is it possible to express disjunction through conjunction and implication?

How can drunken, homicidal elves successfully conduct a wild hunt?

After the loss of Challenger, why weren’t Galileo and Ulysses launched by Centaurs on expendable boosters?

SF novella separating the dumb majority from the intelligent part of mankind

Movie about a boy who was born old and grew young

Remove sudoers using script

Smooth switching between 12v batteries, with toggle switch



Allow recovery from interrupted `badblocks -n`


What are the pros and cons of badblock's two non-destructive tests?Is interrupting badblocks risky?How to interpret badblocks outputBadblocks on 2TB external USB diskhow can I force hdd to give the bad data of a URE sector / bad sector?What are the pros and cons of badblock's two non-destructive tests?u-boot how to mark bad blocksbadblocks source codebadblocks cannot find any badblocksWhat pattern(s) does non-destructive badblocks -n write?badblocks fails to spot corrupting disk controller






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















man badblocks says:




   -n     Use non-destructive read-write mode.



This answer says:




The non-destructive read-write test works by overwriting data, then reading to verify, and then writing the original data back afterwards.




Is there any way to allow for recovery should badblocks be interrupted (eg kernel hang) during or after writing the test data but before it has written back the original data?










share|improve this question


















  • 1





    I don't think there's any way. I may be wrong, but it looks like badblocks is simply saving the original data into a memory buffer, not anywhere on another disk/partition from where it could be restored in the case of a SIGKILL or kernel hang.

    – mosvy
    Feb 12 at 10:46


















1















man badblocks says:




   -n     Use non-destructive read-write mode.



This answer says:




The non-destructive read-write test works by overwriting data, then reading to verify, and then writing the original data back afterwards.




Is there any way to allow for recovery should badblocks be interrupted (eg kernel hang) during or after writing the test data but before it has written back the original data?










share|improve this question


















  • 1





    I don't think there's any way. I may be wrong, but it looks like badblocks is simply saving the original data into a memory buffer, not anywhere on another disk/partition from where it could be restored in the case of a SIGKILL or kernel hang.

    – mosvy
    Feb 12 at 10:46














1












1








1








man badblocks says:




   -n     Use non-destructive read-write mode.



This answer says:




The non-destructive read-write test works by overwriting data, then reading to verify, and then writing the original data back afterwards.




Is there any way to allow for recovery should badblocks be interrupted (eg kernel hang) during or after writing the test data but before it has written back the original data?










share|improve this question














man badblocks says:




   -n     Use non-destructive read-write mode.



This answer says:




The non-destructive read-write test works by overwriting data, then reading to verify, and then writing the original data back afterwards.




Is there any way to allow for recovery should badblocks be interrupted (eg kernel hang) during or after writing the test data but before it has written back the original data?







badblocks






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 12 at 9:00









Tom HaleTom Hale

7,983351111




7,983351111








  • 1





    I don't think there's any way. I may be wrong, but it looks like badblocks is simply saving the original data into a memory buffer, not anywhere on another disk/partition from where it could be restored in the case of a SIGKILL or kernel hang.

    – mosvy
    Feb 12 at 10:46














  • 1





    I don't think there's any way. I may be wrong, but it looks like badblocks is simply saving the original data into a memory buffer, not anywhere on another disk/partition from where it could be restored in the case of a SIGKILL or kernel hang.

    – mosvy
    Feb 12 at 10:46








1




1





I don't think there's any way. I may be wrong, but it looks like badblocks is simply saving the original data into a memory buffer, not anywhere on another disk/partition from where it could be restored in the case of a SIGKILL or kernel hang.

– mosvy
Feb 12 at 10:46





I don't think there's any way. I may be wrong, but it looks like badblocks is simply saving the original data into a memory buffer, not anywhere on another disk/partition from where it could be restored in the case of a SIGKILL or kernel hang.

– mosvy
Feb 12 at 10:46










2 Answers
2






active

oldest

votes


















1














File systems protect data from a crash with journals, checksums, mirrors, etc. The only option I see for badblocks would be to re-compile it with an option to store the read buffer (and location) on disk, but this would make the tool much slower (and would be bad for a NMVe life if one tried to speed it up that way). The better alternative is to use a filesystem to handle it for you; btrfs and zfs are here for you.






share|improve this answer
























  • btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

    – Tom Hale
    Feb 13 at 6:04





















0














Given there doesn't seem to be a way to recover from an interrupted badblocks -n:




  • I run it only on a disk set with filesystem-level redundancy

  • I trust the filesystem can recover should one set of blocks under test be lost






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500121%2fallow-recovery-from-interrupted-badblocks-n%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    File systems protect data from a crash with journals, checksums, mirrors, etc. The only option I see for badblocks would be to re-compile it with an option to store the read buffer (and location) on disk, but this would make the tool much slower (and would be bad for a NMVe life if one tried to speed it up that way). The better alternative is to use a filesystem to handle it for you; btrfs and zfs are here for you.






    share|improve this answer
























    • btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

      – Tom Hale
      Feb 13 at 6:04


















    1














    File systems protect data from a crash with journals, checksums, mirrors, etc. The only option I see for badblocks would be to re-compile it with an option to store the read buffer (and location) on disk, but this would make the tool much slower (and would be bad for a NMVe life if one tried to speed it up that way). The better alternative is to use a filesystem to handle it for you; btrfs and zfs are here for you.






    share|improve this answer
























    • btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

      – Tom Hale
      Feb 13 at 6:04
















    1












    1








    1







    File systems protect data from a crash with journals, checksums, mirrors, etc. The only option I see for badblocks would be to re-compile it with an option to store the read buffer (and location) on disk, but this would make the tool much slower (and would be bad for a NMVe life if one tried to speed it up that way). The better alternative is to use a filesystem to handle it for you; btrfs and zfs are here for you.






    share|improve this answer













    File systems protect data from a crash with journals, checksums, mirrors, etc. The only option I see for badblocks would be to re-compile it with an option to store the read buffer (and location) on disk, but this would make the tool much slower (and would be bad for a NMVe life if one tried to speed it up that way). The better alternative is to use a filesystem to handle it for you; btrfs and zfs are here for you.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 12 at 12:50









    user1133275user1133275

    3,9321925




    3,9321925













    • btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

      – Tom Hale
      Feb 13 at 6:04





















    • btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

      – Tom Hale
      Feb 13 at 6:04



















    btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

    – Tom Hale
    Feb 13 at 6:04







    btrfs's scrub will only do a read test. I'm assuming that badblocks has two (generally) non-destructive tests (read and re-write) for good reason.

    – Tom Hale
    Feb 13 at 6:04















    0














    Given there doesn't seem to be a way to recover from an interrupted badblocks -n:




    • I run it only on a disk set with filesystem-level redundancy

    • I trust the filesystem can recover should one set of blocks under test be lost






    share|improve this answer




























      0














      Given there doesn't seem to be a way to recover from an interrupted badblocks -n:




      • I run it only on a disk set with filesystem-level redundancy

      • I trust the filesystem can recover should one set of blocks under test be lost






      share|improve this answer


























        0












        0








        0







        Given there doesn't seem to be a way to recover from an interrupted badblocks -n:




        • I run it only on a disk set with filesystem-level redundancy

        • I trust the filesystem can recover should one set of blocks under test be lost






        share|improve this answer













        Given there doesn't seem to be a way to recover from an interrupted badblocks -n:




        • I run it only on a disk set with filesystem-level redundancy

        • I trust the filesystem can recover should one set of blocks under test be lost







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 19 mins ago









        Tom HaleTom Hale

        7,983351111




        7,983351111






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500121%2fallow-recovery-from-interrupted-badblocks-n%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m