On 2016-04-18 02:19, Chris Murphy wrote: > With two device failure on raid1 volume, the file system is actually > broken. There's a big hole in the metadata, not just missing data, > because there are only two copies of metadata, distributed across > three drives.
Thanks, I understand that. Well, the drive has not completely failed, it has accidental read-write errors. I still wonder what went wrong and why the kernel has crashed - I think this should not happen, as it does not allow me to operate with the data which still can be read. I am happy to contribute more information if it would help. > btrfs restore might be able to scrape off some files, but I don't > expect it'll get very far. If there were n-way raid1, where every > drive has a complete copy of 100% of the filesystem metadata, what you > suggest would be possible. Actually btrfs restore has recovered many files, however I was not able to run in fully unattended mode as it complains about "looping a lot". Does it mean that files are corrupted / not correctly restored? > OK probably the worst thing you can do if you're trying to recover > data from a degraded volume where a 2nd device is also having > problems, is to mount it rw let alone write anything to it. *shrug* > That's just going to make things much worse and more difficult to > recover, assuming anything can be recovered at all. The least number > of changes you make to such a volume, the better. Another option I have thought about is to shrink the failing volume up to some small value. This will cause chunks to be moved to another location. How btrfs will behave if both copies cannot be read? Would be nice to have a strategy to recover without "btrfs restore" in such case. I wonder because "btrfs restore" assumes pausing of normal system operation to do copying back and forth. -- With best regards, Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html