On 05/07/2019 09.42, Andrei Borzenkov wrote:
On Fri, Jul 5, 2019 at 7:45 AM Vladimir Panteleev
<thecybershadow@xxxxxxxxx> wrote:
Hi,
I'm trying to convert a data=RAID10,metadata=RAID1 (4 disks) array to
RAID1 (2 disks). The array was less than half full, and I disconnected
two parity drives,
btrfs does not have dedicated parity drives; it is quite possible that
some chunks had their mirror pieces on these two drives, meaning you
effectively induced data loss. You had to perform "btrfs device
delete" *first*, then disconnect unused drive after this process has
completed.
Hi Andrei,
Thank you for replying. However, I'm pretty sure this is not the case as
you describe it, and in fact, unrelated to the actual problem I'm having.
- I can access all the data on the volumes just fine.
- All the RAID10 block profiles had been successfully converted to
RAID1. Currently, there are no RAID10 blocks left anywhere on the
filesystem.
- Only the data was in the RAID10 profile. Metadata was and is in RAID1.
It is also metadata which btrfs cannot move away from the missing device.
If you can propose a test to verify your hypothesis, I'd be happy to
check. But, as far as my understanding of btrfs allows me to see, your
conclusion rests on a bad assumption.
Also, IIRC, your suggestion is not applicable. btrfs refuses to remove a
device from a 4-device filesystem with RAID10 blocks, as that would put
it under the minimum number of devices for RAID10 blocks. I think the
"correct" approach would be first to convert all RAID10 blocks to RAID1
and only then remove the devices, however, this was not an option for me
due to other constraints I was working under at the time.
--
Best regards,
Vladimir