Difference between revisions of "Raid on Linux"

From docwiki
Jump to: navigation, search
Line 4: Line 4:
   
 
While they have gotten significantly more reliable in the last years, hard-disk are still the parts that most often fail in computers and they contain all your data. Thus you should always have a good and recent [[Backup]]. But if your server crashes because of a defective hard-drive this is still bad as it means the server is not available and you might need a significant amount of time to restore your data. What we want is a system that can tolerate the failure of a disk and still work. This is what RAID is for.
 
While they have gotten significantly more reliable in the last years, hard-disk are still the parts that most often fail in computers and they contain all your data. Thus you should always have a good and recent [[Backup]]. But if your server crashes because of a defective hard-drive this is still bad as it means the server is not available and you might need a significant amount of time to restore your data. What we want is a system that can tolerate the failure of a disk and still work. This is what RAID is for.
  +
  +
== What is a RAID ==
  +
  +
In a RAID system you store your data on more then one disk when you write and when you read you can take any of the disks that contain a copy of your data and read from there. When one of the disks fails your data is still available. Once your replace the damaged disk the system can sync the data back and restore the redundancy.
  +
  +
On a RAID1 system you have 2 disks and the data is mirrored on both disks.
  +
  +
On a RAID4 and RAID5 you have 3 or more disks and one of the disks is a party disk (on RAID5 the parity is distributed) disk: E.g. on a RAID5 with 4 disks of 1TB you have a capacity of 3TB and one of the disks can fail.
  +
  +
On a RAID6 you have 2 party disks.
  +
  +
On a RAID0 you do '''NOT''' have redundancy but the data is striped between the 2 disks and if one of them fails you loose all your data. People use RAID0 if they need higher performance and if they do not care about data loss.
  +
  +
RAID10 consists of 2 RAID1 systems that are combined as a RAID0 so you have additional performance while still some degree of redundancy. Similar: RAID60 which is a stripe set of 2 RAID6.
   
 
== Software vs. Hardware RAID ==
 
== Software vs. Hardware RAID ==

Revision as of 12:33, 30 October 2020


Motivation

While they have gotten significantly more reliable in the last years, hard-disk are still the parts that most often fail in computers and they contain all your data. Thus you should always have a good and recent Backup. But if your server crashes because of a defective hard-drive this is still bad as it means the server is not available and you might need a significant amount of time to restore your data. What we want is a system that can tolerate the failure of a disk and still work. This is what RAID is for.

What is a RAID

In a RAID system you store your data on more then one disk when you write and when you read you can take any of the disks that contain a copy of your data and read from there. When one of the disks fails your data is still available. Once your replace the damaged disk the system can sync the data back and restore the redundancy.

On a RAID1 system you have 2 disks and the data is mirrored on both disks.

On a RAID4 and RAID5 you have 3 or more disks and one of the disks is a party disk (on RAID5 the parity is distributed) disk: E.g. on a RAID5 with 4 disks of 1TB you have a capacity of 3TB and one of the disks can fail.

On a RAID6 you have 2 party disks.

On a RAID0 you do NOT have redundancy but the data is striped between the 2 disks and if one of them fails you loose all your data. People use RAID0 if they need higher performance and if they do not care about data loss.

RAID10 consists of 2 RAID1 systems that are combined as a RAID0 so you have additional performance while still some degree of redundancy. Similar: RAID60 which is a stripe set of 2 RAID6.

Software vs. Hardware RAID