BTRFS: resolve bytenr to file path

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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?
btrfs
add a comment |Â
up vote
1
down vote
favorite
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?
btrfs
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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?
btrfs
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?
btrfs
asked May 30 at 9:31
MaxHQ
163
163
add a comment |Â
add a comment |Â
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)
add a comment |Â
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)
add a comment |Â
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)
add a comment |Â
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)
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)
answered Jul 13 at 11:16
MaxHQ
163
163
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password