TL;DR: Failed to mount /dev/mapper/root on real root: fixing btrfs “parent transid verify failed”
The fix only. No explanation, no diagnosis. Read the full article if any of this does not match what you are seeing.
Snapshot the VM or image the disk first. Do not run btrfs check --repair.
- At the
[rootfs ~]#prompt, confirm the cause. Look forparent transid verify failed ... wanted N found M:
dmesg | tail -30- Compare the superblock copies (read only):
btrfs inspect-internal dump-super -a /dev/mapper/root | grep -E '^superblock|^generation'- If a mirror copy has a higher generation than the primary, restore it and answer
y:
btrfs rescue super-recover -v /dev/mapper/root- Test the mount, then reboot:
mount -t btrfs /dev/mapper/root /new_root && ls /new_root
umount /new_root
reboot -f- Once it boots:
sudo btrfs scrub start -B /, thensudo btrfs device stats /.