Multi-device btrfs with single data mode and disk failure

btrfs

I had a btrfs partition on a 6 disk array without raid (metadata in raid10, but data in single), and one of the disks just died.

So I lost some of my data, ok, I knew that.

But two question :

  • Is it possible to know (using metadata I suppose) what data I have lost ?

  • Is it possible to do some kind of a "btrfs delete missing" on this kind of setup, in order to recover access in rw to my other data, or I must copy all my data on a new partition

Thank you for any help

(Sorry for my poor english)

Edit : just to be clear, I can mount it in read only whith mount -o recovery,ro,degraded

And btrfs fi df /Data

Data, single: total=6.65TiB, used=6.65TiB
System, RAID1: total=32.00MiB, used=768.00KiB
Metadata, RAID1: total=13.00GiB, used=10.99GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

Best Answer

I'm a very very lucky guy, and I think I fixed my problem (thanks to the help of btrfs mailing list).

In my situation "btrfs-debug-tree -t 3 /dev/sda6" does not mention the missing disk anywhere (data or metadata). So there was nothing at all in the missing device.

Thus, patching the kernel with this patch allow me to mount the array in rw in degraded and a simple btrfs device remove missing did the trick.

So my array is fixed and my data seems fine (scrub in progress)

One thing I learned though is that the single mode should never ever be used.

Related Topic