Difference between revisions of "Btrfs"

675 bytes added ,  10 months ago
Raid Level mit Links untermauert
m (example)
(Raid Level mit Links untermauert)
Line 210: Line 210:
* Convert data to different RAID levels  
* Convert data to different RAID levels  
* Do this while the volume is mounted and being used
* Do this while the volume is mounted and being used
{{BoxInfo|Raid Levels|There’s some similarity with traditional RAID levels, but this could be confusing to users familiar with the traditional meaning. Due to the similarity, the RAID terminology is widely used in the documentation (of btrfs). See [https://en.wikipedia.org/wiki/RAID RAID@wikipedia],[https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#profiles RAID profiles@btrfs.readthedocs]
}}


<!--T:47-->
== [https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#raid0 RAID 0] (not Just a Bunch of Disks)== <!--T:48-->
see [https://en.wikipedia.org/wiki/RAID RAID@wikipedia]
 
== RAID 0 (not Just a Bunch of Disks)== <!--T:48-->
Using one ore more devices to build a volume. This volume has the '''capacity of all the used devices together(1+2+3+4...)'''. This is an very easy way to expand your volume when you need more space.  You even can add 2 or 3 devices at a time. When you want to replace a device, you can add the new device, then remove the old device. Btrfs will move all data as necessary. ''To distribute all data to all devices you may want to '''balance''' the volume.'' Btrfs will stripe the data to all devices.
Using one ore more devices to build a volume. This volume has the '''capacity of all the used devices together(1+2+3+4...)'''. This is an very easy way to expand your volume when you need more space.  You even can add 2 or 3 devices at a time. When you want to replace a device, you can add the new device, then remove the old device. Btrfs will move all data as necessary. ''To distribute all data to all devices you may want to '''balance''' the volume.'' Btrfs will stripe the data to all devices.
{{BoxWarning|If one device fails, everything is lost|Be aware that when one of the devices fails your complete volume may be lost if you use RAID 0}}
{{BoxWarning|If one device fails, everything is lost|Be aware that when one of the devices fails your complete volume may be lost if you use RAID 0}}
Line 224: Line 223:
By default, '''metadata will be mirrored''' across two devices and '''data will be striped''' across all of the devices present. But if you have 2 or more devices in your volume you should consider using RAID 1.
By default, '''metadata will be mirrored''' across two devices and '''data will be striped''' across all of the devices present. But if you have 2 or more devices in your volume you should consider using RAID 1.


== RAID 1 (mirrored), 1C3, 1C4 == <!--T:51-->
== [https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#raid1 RAID 1] (mirrored), [https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html#raid1c3 1C3], [https://btrfs.readthedocs.io/en/stable/mkfs.btrfs.html#man-mkfs-profiles 1C4] == <!--T:51-->


<!--T:52-->
<!--T:52-->
Line 232: Line 231:
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 can be forced by using btrfs scrub.


=== 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.


translator
1,001

edits