Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 8901  / 2 Years ago, sat, february 19, 2022, 3:15:22

The hardware is an external 2TB bus powered USB disk.


What I want is a RAID1 setup of 2x 1TB btrfs.


Is this possible? How?


__


Motivation


The motivation for me to use RAID1 btrfs is because I just read an article talking about how such a setup would repair corrupted files automatically when the checksum on one volume fails.


Example of what can happen with a .jpeg by just flipping one bit (I used vim for this. :%!xxd -b)


enter image description here enter image description here


More From » raid

 Answers
7

I assume you use 2 external drives or 1 enclosure housing 2 or more drives. Theoretically it shouldn't matter if the devices are connected via USB or SATA, btrfs should be able to assemble the array once it finds the individual drives/partitions.



You should have a look at the btrfs kernel wiki. The first usecase seems to cover what you asked for:



mkfs.btrfs -m raid1 -d raid1 /dev/sda1 /dev/sdb1


But I'm not sure about the selfhealing part. I only know that from ZFS.


[#27453] Sunday, February 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
issfullus

Total Points: 264
Total Questions: 126
Total Answers: 107

Location: Comoros
Member since Mon, Dec 19, 2022
1 Year ago
;