Usage ddrescue with -d option?












0















I am learning to use ddrescue and I would like to know what the -d (direct) option is for and in what scenarios it is recommended to use.










share|improve this question























  • Have you read the documentation for it? man ddrescue

    – roaima
    Jan 3 at 8:27











  • @roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.

    – MarianoM
    Jan 3 at 8:33
















0















I am learning to use ddrescue and I would like to know what the -d (direct) option is for and in what scenarios it is recommended to use.










share|improve this question























  • Have you read the documentation for it? man ddrescue

    – roaima
    Jan 3 at 8:27











  • @roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.

    – MarianoM
    Jan 3 at 8:33














0












0








0








I am learning to use ddrescue and I would like to know what the -d (direct) option is for and in what scenarios it is recommended to use.










share|improve this question














I am learning to use ddrescue and I would like to know what the -d (direct) option is for and in what scenarios it is recommended to use.







ddrescue






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 8:23









MarianoMMarianoM

165




165













  • Have you read the documentation for it? man ddrescue

    – roaima
    Jan 3 at 8:27











  • @roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.

    – MarianoM
    Jan 3 at 8:33



















  • Have you read the documentation for it? man ddrescue

    – roaima
    Jan 3 at 8:27











  • @roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.

    – MarianoM
    Jan 3 at 8:33

















Have you read the documentation for it? man ddrescue

– roaima
Jan 3 at 8:27





Have you read the documentation for it? man ddrescue

– roaima
Jan 3 at 8:27













@roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.

– MarianoM
Jan 3 at 8:33





@roaima Yes, it just says "use direct disc access for input file" but it does not say what it does specifically to know in which situations to use it.

– MarianoM
Jan 3 at 8:33










1 Answer
1






active

oldest

votes


















0














In some circumstances -d (or --idirect) allows you to rescue more data.



It's true man ddrescue shortly says it means




use direct disc access for input file




and this may not explain a lot. However there's also GNU ddrescue Manual online:




11 Direct disc access



If you notice that the positions and sizes in mapfile are always multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access for infile, or read from a raw device, to bypass the kernel cache and rescue more of your data.



NOTE! Sector size must be correctly set with the --sector-size option for direct disc access to work.



NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain.



Try the --idirect option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device. Some OSs provide raw access through especial device names, like /dev/rdisk.



Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. On some systems, ddrescue can't determine the size of a raw device, so an explicit --size or --complete-only option may be needed.



Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower you may want to make a first pass using normal cached reads and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.







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%2f492188%2fusage-ddrescue-with-d-option%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









    0














    In some circumstances -d (or --idirect) allows you to rescue more data.



    It's true man ddrescue shortly says it means




    use direct disc access for input file




    and this may not explain a lot. However there's also GNU ddrescue Manual online:




    11 Direct disc access



    If you notice that the positions and sizes in mapfile are always multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access for infile, or read from a raw device, to bypass the kernel cache and rescue more of your data.



    NOTE! Sector size must be correctly set with the --sector-size option for direct disc access to work.



    NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain.



    Try the --idirect option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device. Some OSs provide raw access through especial device names, like /dev/rdisk.



    Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. On some systems, ddrescue can't determine the size of a raw device, so an explicit --size or --complete-only option may be needed.



    Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower you may want to make a first pass using normal cached reads and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.







    share|improve this answer




























      0














      In some circumstances -d (or --idirect) allows you to rescue more data.



      It's true man ddrescue shortly says it means




      use direct disc access for input file




      and this may not explain a lot. However there's also GNU ddrescue Manual online:




      11 Direct disc access



      If you notice that the positions and sizes in mapfile are always multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access for infile, or read from a raw device, to bypass the kernel cache and rescue more of your data.



      NOTE! Sector size must be correctly set with the --sector-size option for direct disc access to work.



      NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain.



      Try the --idirect option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device. Some OSs provide raw access through especial device names, like /dev/rdisk.



      Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. On some systems, ddrescue can't determine the size of a raw device, so an explicit --size or --complete-only option may be needed.



      Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower you may want to make a first pass using normal cached reads and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.







      share|improve this answer


























        0












        0








        0







        In some circumstances -d (or --idirect) allows you to rescue more data.



        It's true man ddrescue shortly says it means




        use direct disc access for input file




        and this may not explain a lot. However there's also GNU ddrescue Manual online:




        11 Direct disc access



        If you notice that the positions and sizes in mapfile are always multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access for infile, or read from a raw device, to bypass the kernel cache and rescue more of your data.



        NOTE! Sector size must be correctly set with the --sector-size option for direct disc access to work.



        NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain.



        Try the --idirect option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device. Some OSs provide raw access through especial device names, like /dev/rdisk.



        Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. On some systems, ddrescue can't determine the size of a raw device, so an explicit --size or --complete-only option may be needed.



        Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower you may want to make a first pass using normal cached reads and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.







        share|improve this answer













        In some circumstances -d (or --idirect) allows you to rescue more data.



        It's true man ddrescue shortly says it means




        use direct disc access for input file




        and this may not explain a lot. However there's also GNU ddrescue Manual online:




        11 Direct disc access



        If you notice that the positions and sizes in mapfile are always multiples of the sector size, maybe your kernel is caching the disc accesses and grouping them. In this case you may want to use direct disc access for infile, or read from a raw device, to bypass the kernel cache and rescue more of your data.



        NOTE! Sector size must be correctly set with the --sector-size option for direct disc access to work.



        NOTE: Direct disc access can copy arbitrary domains by reading whole sectors and then writing only the requested part. This is the only case where ddrescue will try to read data outside of the rescue domain.



        Try the --idirect option first. If direct disc access is not available in your system, try raw devices. Read your system documentation to find how to bind a raw device to a regular block device. Some OSs provide raw access through especial device names, like /dev/rdisk.



        Ddrescue aligns its I/O buffer to the sector size so that it can be used for direct disc access or to read from raw devices. For efficiency reasons, also aligns it to the memory page size if page size is a multiple of sector size. On some systems, ddrescue can't determine the size of a raw device, so an explicit --size or --complete-only option may be needed.



        Using direct disc access, or reading from a raw device, may be slower or faster than normal cached reading depending on your OS and hardware. In case it is slower you may want to make a first pass using normal cached reads and use direct disc access, or a raw device, only to recover the good sectors inside the failed blocks.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 9:48









        Kamil MaciorowskiKamil Maciorowski

        1,2591625




        1,2591625






























            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%2f492188%2fusage-ddrescue-with-d-option%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

            Morgemoulin

            Scott Moir

            Souastre