translator
1,018
edits
m (deep) |
(Bulletproof) |
||
Line 228: | Line 228: | ||
<!--T:52--> | <!--T:52--> | ||
When using | When using RAID 1 btrfs mirrors '''data and metadata'''. This way it is possible to repair data when one copy gets damaged. This could happen when one device fails, when power was lost while writing, ... '''After enabling RAID1''' all new data and metadata is automatically mirrored. To mirror your existing data and metadata, '''you have to balance your complete volume'''. | ||
=== Automatic repair === <!--T:53--> | === Automatic repair === <!--T:53--> | ||
In order to preserve the integrity of the volume, Btrfs does separate CRC-checksums of metadata blocks and of data blocks. Every time a data block is read, the checksum is verified. When the checksum shows that the data is not good, Btrfs tries to get a good copy from the mirrored block. Then the bad block is written again with the good data from the mirrored block. This happens in background. The filesystem has been repaired, and this is logged into syslog. This can be forced by using btrfs scrub. | In order to preserve the integrity of the volume, Btrfs does separate CRC-checksums of metadata blocks and of data blocks. Every time a data block is read, the checksum is verified. When the checksum shows that the data is not good, Btrfs tries to get a good copy from the mirrored block. Then the bad block is written again with the good data from the mirrored block. This happens in background. The filesystem has been repaired, and this is logged into syslog. This repair can be forced by using btrfs scrub. | ||
=== [https://btrfs.readthedocs.io/en/stable/mkfs.btrfs.html#man-mkfs-profiles RAID 10] (automatic) === <!--T:54--> | === [https://btrfs.readthedocs.io/en/stable/mkfs.btrfs.html#man-mkfs-profiles RAID 10] (automatic) === <!--T:54--> | ||
When using enough devices(4...) with RAID 1, Btrfs will distribute all data, so that it not only is mirrored but also striped. | When using enough devices(4...) with RAID 1, Btrfs will distribute all data, so that it not only is mirrored but also striped. | ||
{{BoxInfo|Bulletproof your system|If you have enough storage space and it is spread across 2 devices, it is really advisable to use btrfs RAID1/10. This will cover a whole range of risks that would be impossible to manage without RAID. At the same time, RAID in BTRFS is as straightforward as it gets. | |||
}} | |||
== RAID 5 == <!--T:55--> | == RAID 5 == <!--T:55--> |