meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:fs:btrfs_multidisk [2017/05/19 08:40]
niziak
linux:fs:btrfs_multidisk [2021/02/16 21:07] (current)
niziak
Line 1: Line 1:
 ====== BTRFS on multiple devices ====== ====== BTRFS on multiple devices ======
 +
 +[[https://​serverfault.com/​questions/​814546/​how-to-obtain-read-speeds-of-two-disks-using-mdadm-btrfs-raid1-or-zfs-mirror]]
  
 ===== Encryption layout ===== ===== Encryption layout =====
Line 5: Line 7:
 ==== BTRFS on crypted devices ==== ==== BTRFS on crypted devices ====
 |  btrfs raid1    ||      |  btrfs raid1    ||     
-|  crypt |  crypt  | +|  crypt  |  crypt  | 
-|  sda1  |  sdb1   |+|  sda1   ​|  sdb1   |
  
   * (-) Encryption has to be performed twice (no problem for modern CPUs)   * (-) Encryption has to be performed twice (no problem for modern CPUs)
-  * (+) Bitflips ​can be detected ​immediatelly ​and corrected by BTRFS+  * (+) Bit-flips ​can be detected ​immediately ​and corrected by BTRFS 
 +  * (-) not possible to get benefit from hybrid RAID1 (mixed disc HDD & SSD) 
 + 
 + 
 +==== BTRFS on crypted devices with LVM ==== 
 + 
 +|  btrfs raid1    || 
 +|  crypt  |  crypt  | 
 +|  LVM    |  LVM    | 
 +|  (DM-Cache on fast SSD)  || 
 +|  sda1   ​| ​ sdb1   ​| ​ | 
 + 
 +  * (-) Encryption has to be performed twice (no problem for modern CPUs) 
 +  * (+) Bit-flips can be detected immediately and corrected by BTRFS 
 +  * (-) not possible to get benefit from hybrid RAID1 (mixed disc HDD & SSD) 
 +  * (-) small overhead from LVM but 
 +  * (+) DM-cache with SSD disc can be used: [[https://​www.redhat.com/​en/​blog/​improving-read-performance-dm-cache]]
  
 ==== BTRFS on soft RAID1 ==== ==== BTRFS on soft RAID1 ====
Line 18: Line 36:
  
   * (+) encryption performed only once (less CPU consumption)   * (+) encryption performed only once (less CPU consumption)
-  * (-) Bitflips ​detected only during ​raid1 scan.+  * (-) Bit-flips ​detected only during ​RAID1 scan. 
 +  * (+) Benefits from hybrid RAID1 (SSH & HHD) using "​writemostly"​ feature). See [[http://​tansi.info/​hybrid/​]] 
 + 
  
 ===== Prepare 2nd disc ===== ===== Prepare 2nd disc =====
Line 41: Line 62:
 btrfs device add /​dev/​disc1/​btrfs1 /  btrfs device add /​dev/​disc1/​btrfs1 / 
 btrfs device usage / btrfs device usage /
-btrfs balance start -v -dconvert=raid1 -mconvert=raid1 /+nice ionice -c3 btrfs balance start -v -dconvert=raid1 -mconvert=raid1 ​-dsoft -msoft ​/
 btrfs device usage / btrfs device usage /
 </​code>​ </​code>​
 +Note: "​soft"​ filter will convert only chunks which are not already converted (usefull when previous balance was incomplete)
 +
 Make sure that data on both disc are the same. Especially system data are on both disc in RAID1 mode. Make sure that data on both disc are the same. Especially system data are on both disc in RAID1 mode.