Answer the question
In order to leave comments, you need to log in
How to restore btrfs with LVM and RAID0?
Hello!
One hard from the raid0 software array flew off, fortunately, I managed to dump it from the hard using ddrescue.
During operation, the system worked for some time, but due to a failed hard drive, could the system break the FS?
I restored the raid0 array, LVM volumes immediately loaded. But it didn't turn out to be that easy.
Previously, ZFS was also stored in the LVM physical volume, then I demolished it and added space to btrfs.
Now I dumped the LVM partition with btrfs (/dev/mapper/lvm-root).
Of course, it's impossible to mount even in ro:
mount lvm dir:
mount: unknown filesystem type 'zfs_member' It's not at all
clear where zfs came from?
Okay, let's try btrfs restore lvm dir:
parent transid verify failed on 341868544 wanted 66322 found 65220
parent transid verify failed on 341868544 wanted 66322 found 65220
parent transid verify failed on 341868544 wanted 66322 found 65220
parent transid verify failed on 341868544 wanted 66322 found 65220
Ignoring transid failure
Couldn't setup extent tree
Couldn't setup device tree
Could not open root, trying backup super
parent transid verify failed on 336117760 wanted 66320 found 66323
parent transid verify failed on 336117760 wanted 66320 found 66323
parent transid verify failed on 336117760 wanted 66320 found 66323
parent transid verify failed on 336117760 wanted 66320 found 66323
Ignoring transid failure
leaf parent key incorrect 336117760
Couldn't setup extent tree
parent transid verify failed on 336117760 wanted 66320 found 66323
Ignoring transid failure
leaf parent key incorrect 336117760
Couldn't setup device tree
Could not open root, trying backup super
Superblock bytenr is larger than device size
Could not open root, trying backup super
parent transid verify failed on 341868544 wanted 66322 found 65220
parent transid verify failed on 341868544 wanted 66322 found 65220
parent transid verify failed on 341868544 wanted 66322 found 65220
parent transid verify failed on 341868544 wanted 66322 found 65220
Ignoring transid failure
Couldn't setup extent tree
Couldn't setup device tree
Superblock thinks the generation is 66322
Superblock thinks the level is 1
Well block 335085568(gen: 66323 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 342491136(gen: 66322 level: 0) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 340180992(gen: 66321 level: 0) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 336003072(gen: 66320 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 327778304(gen: 66319 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 294731776(gen: 66303 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 268271616(gen: 66302 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 257458176(gen: 66300 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 212287488(gen: 66280 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
Well block 201048064(gen: 66275 level: 1) seems good, but generation/level doesn't match, want gen: 66322 level: 1
и куча бла-бла бла
parent transid verify failed on 335085568 wanted 66322 found 66323
parent transid verify failed on 335085568 wanted 66322 found 66323
parent transid verify failed on 335085568 wanted 66322 found 66323
parent transid verify failed on 335085568 wanted 66322 found 66323
Ignoring transid failure
parent transid verify failed on 333627392 wanted 66323 found 66321
parent transid verify failed on 333627392 wanted 66323 found 66321
parent transid verify failed on 333627392 wanted 66323 found 66321
parent transid verify failed on 333627392 wanted 66323 found 66321
Ignoring transid failure
parent transid verify failed on 334643200 wanted 66323 found 66320
parent transid verify failed on 334643200 wanted 66323 found 66320
parent transid verify failed on 334643200 wanted 66323 found 66320
parent transid verify failed on 334643200 wanted 66323 found 66320
Ignoring transid failure
Error searching -1
parent transid verify failed on 27404550144 wanted 66322 found 66204
parent transid verify failed on 27404550144 wanted 66322 found 66204
parent transid verify failed on 27404550144 wanted 66322 found 66204
parent transid verify failed on 27404550144 wanted 66322 found 66204
Ignoring transid failure
failed to inflate: -3
Error copying data for recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Error searching recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Error searching recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Error searching recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Error searching recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Error searching recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Error searching recu/home/su/.cache/opera/Cache/index-dir/the-real-index
Answer the question
In order to leave comments, you need to log in
Generally!
Data recovery from btrfs is done like this:
1) We are looking for a block using btrfs-find-root, where there may be data. Let's look at it.
2) Using btrfs restore -it 27404550144 /dev/sda1 recu-dir we restore.
The -i (ignore errors) parameter is required, otherwise the process will stop on an error, which prevented me.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question