Zero filling (vs one-filling) drives: convention or practical reason?












0















Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?



Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?










share|improve this question























  • Some discussion over here....security.stackexchange.com/questions/10464/…

    – Moab
    Feb 8 at 4:32











  • Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.

    – Thoughtcraft
    Feb 8 at 4:41








  • 1





    Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0

    – Moab
    Feb 8 at 13:57
















0















Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?



Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?










share|improve this question























  • Some discussion over here....security.stackexchange.com/questions/10464/…

    – Moab
    Feb 8 at 4:32











  • Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.

    – Thoughtcraft
    Feb 8 at 4:41








  • 1





    Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0

    – Moab
    Feb 8 at 13:57














0












0








0








Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?



Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?










share|improve this question














Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?



Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?







hard-drive ssd format overwrite physical-wear






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 8 at 3:54









ThoughtcraftThoughtcraft

15115




15115













  • Some discussion over here....security.stackexchange.com/questions/10464/…

    – Moab
    Feb 8 at 4:32











  • Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.

    – Thoughtcraft
    Feb 8 at 4:41








  • 1





    Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0

    – Moab
    Feb 8 at 13:57



















  • Some discussion over here....security.stackexchange.com/questions/10464/…

    – Moab
    Feb 8 at 4:32











  • Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.

    – Thoughtcraft
    Feb 8 at 4:41








  • 1





    Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0

    – Moab
    Feb 8 at 13:57

















Some discussion over here....security.stackexchange.com/questions/10464/…

– Moab
Feb 8 at 4:32





Some discussion over here....security.stackexchange.com/questions/10464/…

– Moab
Feb 8 at 4:32













Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.

– Thoughtcraft
Feb 8 at 4:41







Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.

– Thoughtcraft
Feb 8 at 4:41






1




1





Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0

– Moab
Feb 8 at 13:57





Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0

– Moab
Feb 8 at 13:57










1 Answer
1






active

oldest

votes


















3















Is one harder on the device physically than the other?




Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.




are there any other possible considerations?




I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd, cat or cp (rather than writing your own program), filling with zeros from /dev/zero seems natural.



Zero-filling is easy:



cp /dev/zero /dev/sdX


while one-filling requires some additional work:



</dev/zero tr '' '377' >/dev/sdX


Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fsuperuser.com%2fquestions%2f1403394%2fzero-filling-vs-one-filling-drives-convention-or-practical-reason%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3















    Is one harder on the device physically than the other?




    Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.




    are there any other possible considerations?




    I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd, cat or cp (rather than writing your own program), filling with zeros from /dev/zero seems natural.



    Zero-filling is easy:



    cp /dev/zero /dev/sdX


    while one-filling requires some additional work:



    </dev/zero tr '' '377' >/dev/sdX


    Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.






    share|improve this answer






























      3















      Is one harder on the device physically than the other?




      Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.




      are there any other possible considerations?




      I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd, cat or cp (rather than writing your own program), filling with zeros from /dev/zero seems natural.



      Zero-filling is easy:



      cp /dev/zero /dev/sdX


      while one-filling requires some additional work:



      </dev/zero tr '' '377' >/dev/sdX


      Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.






      share|improve this answer




























        3












        3








        3








        Is one harder on the device physically than the other?




        Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.




        are there any other possible considerations?




        I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd, cat or cp (rather than writing your own program), filling with zeros from /dev/zero seems natural.



        Zero-filling is easy:



        cp /dev/zero /dev/sdX


        while one-filling requires some additional work:



        </dev/zero tr '' '377' >/dev/sdX


        Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.






        share|improve this answer
















        Is one harder on the device physically than the other?




        Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.




        are there any other possible considerations?




        I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd, cat or cp (rather than writing your own program), filling with zeros from /dev/zero seems natural.



        Zero-filling is easy:



        cp /dev/zero /dev/sdX


        while one-filling requires some additional work:



        </dev/zero tr '' '377' >/dev/sdX


        Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 8 at 6:21

























        answered Feb 8 at 5:42









        Kamil MaciorowskiKamil Maciorowski

        28.5k156187




        28.5k156187






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • 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%2fsuperuser.com%2fquestions%2f1403394%2fzero-filling-vs-one-filling-drives-convention-or-practical-reason%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

            How to make a Squid Proxy server?

            Is this a new Fibonacci Identity?

            19世紀