RAID

From NixTheWorld

Jump to: navigation, search

snippet

Now, binary math (using only 0 & 1): 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0

This simple math will help us understand basic RAID principles.

In simple-raid, two disks are used which just completely keep a mirror-copy of the other. That setup would mean that (2) 80GB disks can hold (2) copies of 80GB of data.

In advanced raid, three disks are used. That setup would mean (3) 80GB disks can hold (2) copies of 160GB of data.

But wait you say, (2) copies of 160GB is 320GB, but (3) 80GB disks is only 240GB!

Since data is recorded on disks in bits (8-digit binary code), a single byte on a disk may look like this:

00000001

Then, data on the second disk may look like this:

00001100

So then, what is recorded on the third disk?:

00001101

Notice something?

disk1 data: 00000001
disk2 data: 00001100
--------------------
disk3 data: 00001101
00000001 + 00001100 = 00001101

So, we can completely fill disk1 and disk2, and by keeping the "difference" of their data on disk3, have a full backup in case any (1) disk fails.

Thus, if disk1 failed, we would use the data from disk3:
00001101

and subtract the data from disk2:
00001100

This would leave us with:
disk3: 00001101
disk2: 00001100
---------------
disk1: 00000001

This same formula makes it able for us to regenerate the data for any of the (3) disks in the array, given that we still have two working disks. This is also why it is important for all (3) disks in the array to be the same size/model/etc.

Personal tools