I have btrfs on two partitions using btrfs's raid1 mode:
Now I plan to run
btrfs device add /dev/sda2 /dev/sdb2, so I'll have four partitions:
/dev/sda2 /dev/sda3 /dev/sdb2 /dev/sdb3
My question: will btrfs know that sda2 and sda3 are the same disk, so it shouldn't mirror data between those two?
(I realize it's a bit silly to have two partitions on each disk, but I already have data on the filesystem and this seems the fastest way to add space.)
The closest thing I could find to an answer is a project idea from the wiki concerned with devices on the same controller: https://btrfs.wiki.kernel.org/index.php/Project_ideas#Chunk_allocation_groups . It almost seems to imply this already happens for devices, but this might just be wishful thinking on my part.
Edit: I forgot to mention, these will all be luks-encrypted, so the actual btrfs devices will be /dev/dm- or some such. But I'm curious to know the answer with or without the encryption layer.