BTRFS: resolve bytenr to file path

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












I have several errors on my BTRFS partition (SSD -> luks -> BTRFS):



btrfs check --check-data-csum -p --force /dev/mapper/sda3_crypt
...
mirror 0 bytenr 1337316519936 csum 850178701 expected csum 2442214357
mirror 1 bytenr 1337316519936 csum 850178701 expected csum 2442214357
mirror 1 bytenr 1337316524032 csum 3411875857 expected csum 208994536


I'd like to know which files are affected but there are no inodes given.



Is there a way to resolve the listed bytenr values to an actual file path?







share|improve this question























    up vote
    1
    down vote

    favorite
    1












    I have several errors on my BTRFS partition (SSD -> luks -> BTRFS):



    btrfs check --check-data-csum -p --force /dev/mapper/sda3_crypt
    ...
    mirror 0 bytenr 1337316519936 csum 850178701 expected csum 2442214357
    mirror 1 bytenr 1337316519936 csum 850178701 expected csum 2442214357
    mirror 1 bytenr 1337316524032 csum 3411875857 expected csum 208994536


    I'd like to know which files are affected but there are no inodes given.



    Is there a way to resolve the listed bytenr values to an actual file path?







    share|improve this question





















      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      I have several errors on my BTRFS partition (SSD -> luks -> BTRFS):



      btrfs check --check-data-csum -p --force /dev/mapper/sda3_crypt
      ...
      mirror 0 bytenr 1337316519936 csum 850178701 expected csum 2442214357
      mirror 1 bytenr 1337316519936 csum 850178701 expected csum 2442214357
      mirror 1 bytenr 1337316524032 csum 3411875857 expected csum 208994536


      I'd like to know which files are affected but there are no inodes given.



      Is there a way to resolve the listed bytenr values to an actual file path?







      share|improve this question











      I have several errors on my BTRFS partition (SSD -> luks -> BTRFS):



      btrfs check --check-data-csum -p --force /dev/mapper/sda3_crypt
      ...
      mirror 0 bytenr 1337316519936 csum 850178701 expected csum 2442214357
      mirror 1 bytenr 1337316519936 csum 850178701 expected csum 2442214357
      mirror 1 bytenr 1337316524032 csum 3411875857 expected csum 208994536


      I'd like to know which files are affected but there are no inodes given.



      Is there a way to resolve the listed bytenr values to an actual file path?









      share|improve this question










      share|improve this question




      share|improve this question









      asked May 30 at 9:31









      MaxHQ

      163




      163




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          To resolve the bytenr use the following command:



          btrfs inspect-internal logical-resolve <bytenr> <path>


          where <path> should point to the BTRFS top-level subvolume to be able to list the affected files in all snapshots (one bytenr may be linked by a file that exists in several snapshots).



          Example:



          mkdir /mnt/btrfs-root
          mount -t btrfs -o subvolid=5 /dev/sda2 /mnt/btrfs-root

          btrfs inspect-internal logical-resolve 1337316519936 /mnt/btrfs-root

          umount /mnt/btrfs-root && rmdir /mnt/btrfs-root


          Please note: subvolid=5 will mount the "BTRFS root" (or top-level subvolume). A freshly created filesystem is also a subvolume, called top-level, internally has an id 5. (Kernel.org)






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f446864%2fbtrfs-resolve-bytenr-to-file-path%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            To resolve the bytenr use the following command:



            btrfs inspect-internal logical-resolve <bytenr> <path>


            where <path> should point to the BTRFS top-level subvolume to be able to list the affected files in all snapshots (one bytenr may be linked by a file that exists in several snapshots).



            Example:



            mkdir /mnt/btrfs-root
            mount -t btrfs -o subvolid=5 /dev/sda2 /mnt/btrfs-root

            btrfs inspect-internal logical-resolve 1337316519936 /mnt/btrfs-root

            umount /mnt/btrfs-root && rmdir /mnt/btrfs-root


            Please note: subvolid=5 will mount the "BTRFS root" (or top-level subvolume). A freshly created filesystem is also a subvolume, called top-level, internally has an id 5. (Kernel.org)






            share|improve this answer

























              up vote
              1
              down vote













              To resolve the bytenr use the following command:



              btrfs inspect-internal logical-resolve <bytenr> <path>


              where <path> should point to the BTRFS top-level subvolume to be able to list the affected files in all snapshots (one bytenr may be linked by a file that exists in several snapshots).



              Example:



              mkdir /mnt/btrfs-root
              mount -t btrfs -o subvolid=5 /dev/sda2 /mnt/btrfs-root

              btrfs inspect-internal logical-resolve 1337316519936 /mnt/btrfs-root

              umount /mnt/btrfs-root && rmdir /mnt/btrfs-root


              Please note: subvolid=5 will mount the "BTRFS root" (or top-level subvolume). A freshly created filesystem is also a subvolume, called top-level, internally has an id 5. (Kernel.org)






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                To resolve the bytenr use the following command:



                btrfs inspect-internal logical-resolve <bytenr> <path>


                where <path> should point to the BTRFS top-level subvolume to be able to list the affected files in all snapshots (one bytenr may be linked by a file that exists in several snapshots).



                Example:



                mkdir /mnt/btrfs-root
                mount -t btrfs -o subvolid=5 /dev/sda2 /mnt/btrfs-root

                btrfs inspect-internal logical-resolve 1337316519936 /mnt/btrfs-root

                umount /mnt/btrfs-root && rmdir /mnt/btrfs-root


                Please note: subvolid=5 will mount the "BTRFS root" (or top-level subvolume). A freshly created filesystem is also a subvolume, called top-level, internally has an id 5. (Kernel.org)






                share|improve this answer













                To resolve the bytenr use the following command:



                btrfs inspect-internal logical-resolve <bytenr> <path>


                where <path> should point to the BTRFS top-level subvolume to be able to list the affected files in all snapshots (one bytenr may be linked by a file that exists in several snapshots).



                Example:



                mkdir /mnt/btrfs-root
                mount -t btrfs -o subvolid=5 /dev/sda2 /mnt/btrfs-root

                btrfs inspect-internal logical-resolve 1337316519936 /mnt/btrfs-root

                umount /mnt/btrfs-root && rmdir /mnt/btrfs-root


                Please note: subvolid=5 will mount the "BTRFS root" (or top-level subvolume). A freshly created filesystem is also a subvolume, called top-level, internally has an id 5. (Kernel.org)







                share|improve this answer













                share|improve this answer



                share|improve this answer











                answered Jul 13 at 11:16









                MaxHQ

                163




                163






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446864%2fbtrfs-resolve-bytenr-to-file-path%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)