[arch-general] [PARTIALLY SOLVED] Btrfs RAID1 corrupted after crash

Maximilian Bräutigam m at xbra.de
Mon Apr 14 03:21:28 EDT 2014


Am 14.04.2014 00:15, schrieb Rodrigo Rivas:
> On Sun, Apr 13, 2014 at 10:23 PM, Maximilian Bräutigam <m at xbra.de> wrote:
> 
>> Please, help me! ;( Are there other options to investigate my RAID or
>> to even temporarily mount it to get some data? What went wrong here?
>> What can I do? Why is a simple crash making my RAID unusable? Can I
>> use other tools for a recovery?
> 
> I've had (a lot of) luck in the past with "btrfs restore" [1]. It will
> not fix your volumes, but it will copy whatever it can read from the
> disk to a safe place. If it is a RAID1 both disks should hold the same
> data, so you can try btrfs-restoring first one and then the other...
> 
> HTH
> 
> [1]: https://btrfs.wiki.kernel.org/index.php/Restore
> 

Hi all,

thanks for your replies. I tried several things according to [1].

1) btrfs restore
Was not really working, only a few GB of my data.

2) then I realised some "transid verify failed", so I did a
btrfs-zero-log DEVICE

3) From here I was able to mount my volume again – so I could save my
latest photos.

When I mount my volume with autodefrag,compress=lzo,subvolid=0, I end up
with a "rw" mounted device. Then I copy some data with e.g. rsync and it
turns to "ro" at some point. I found this while I wanted to scrub the
devices, but this is naturally only working for writable mounts. And it
is still – I don't know why – not possible to boot from the device again.

Things to do next: try again with recovery option. If this is not
working: roll back to ext4. But I really like the idea behind COW,
subvolumes, no partitioning, RAID and everything in one fs. Snapshots
against user mistakes, RAID against disk failure – perfectly save, if
there was not the fs itself.

So far, so good. The problem is, that even if I can come back to a fully
working device or RAID again, the work load (that I have to put in just
because my computer crashed) is much to high for something profound like
a home dir.

Unfortunately, the only thing I learned to far is to give btrfs some
more decades to age. More ideas are of course welcome.

Best wishes and thanks again,
Max

[1] https://unix.stackexchange.com/questions/32440/how-do-i-fix-btrfs


More information about the arch-general mailing list