BTRFS subvolume unable to restore or access

I’m having some issues with a btrfs filesystem. I started a vm with the sdd /dev/nvme0n1 passed through and then because the gpu passthrough failed i hard rest using the case reset button. i then was stopped from booting as one of the partitions was in the fstab which i fixed by removing it. i have since been unable to mount the partition in its entirety. i have however been able to use btrfs restore to access some of the subvolumes however the main subvolume i’m trying to get to is still unavailable. I have tried to use btrfs check to try and fix the error but have been unable to. If you need specific logs or commands ran i am happy to provide just let me know which ones.

The only subvolume i care about is /data/files which has the subvolume id of 260. After checking the output from
btrfs restore -vi --path-regex '^/(|data(|files(|/.*)))$'
which was

parent transid verify failed on 5275648 wanted 12711 found 12712
parent transid verify failed on 5275648 wanted 12711 found 12712
Ignoring transid failure
Restoring /mnt/backup/data
Done searching /data
Reached the end of the tree searching the directory

which didnt grab any files but according to the btrfs wiki its should be possible to mount it still as the numbers are only 1 apart

For example:
parent transid verify failed on 29360128 wanted 1486656 found 1486662
If the second two numbers ( wanted 1486656 and found 1486662 ) are close together (within about 20 of each other), then mounting with
-o ro,usebackuproot

would it be possible to use these options with relation to the subvolume id to mount it and recover the data?

recovered data with undelete-btrfs. marking as answer for other people.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.