Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have btrfs on two partitions using btrfs's raid1 mode:

/dev/sda3
/dev/sdb3

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-[0123] or some such. But I'm curious to know the answer with or without the encryption layer.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.