# Windows

## General discussion

Locked

### Riad 5 How it Works ??

By ·
Could anybody explain How Raid Level 5 Works ??
how can you recover the data on corrupted Disk using the parity info which is stored on some other disk in an array ??

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

Collapse -

### Riad 5 How it Works ??

Hi,

Raid5 is conceptually the same as raid3 except the parity information is randomly distributed across all the disks in the raid set.

So... for raid3, in the case of three disks, two disks contain the real data and one contains the parity information.

If one disk fails, then that parity information can be used to calculate what was on the third.

For example. If the three disks contain the following binary data... 1 1 1 ... so a read gets the binary 1 from each disk and the thirddisk is the parity disk, then if any one disk fails, an "Xor" operation applied to the working disks' data will recover the third disk's data.

1 Xor 1 = 1

suppose the disks had 1 0 0

Then again the result of Xor-ing against two of these values will result in the third.

Here's a complete Xor table...

A B Q
0 0 0
0 1 1
1 0 1
1 1 0

You can probably see that having lost any one disk, the data can be re-created by xor-ing the other two.

The algorithm isobviously more complicated for more than three disks. Here is a text on that...

http://theory.lcs.mit.edu/~vaziri/raid.html

(remove spaces from the above URL)

So... when you rebuild the set after replacing a disk, the data is simply re-created and stored back on the third disk.

In general raid5 gives you total data equal to the number of disks in the set - 1.

Hope this helps,
Cheers,
Tim.

Collapse -

### Riad 5 How it Works ??

Ooops. Both my examples dont work. You can see from the table that neither will happen in practice! The table is correct and so data will be distributed over the disks as per that table.

Full points if you spotted that before reading this! :-)Cheers,
Tim.

By the way, a link to a logic page might help...

http://www.howstuffworks.com/boolean1.htm

Collapse -

Collapse -

### Riad 5 How it Works ??

To use raid5 you must have at least 3 physical disk. There are two kind of raid 5: hardware by raid card and software by example windows 2000.

I still refer to use hardware raid for a serious server.

Data will be cut into small pieces, and will be write to (total of physical disks)-1, the remain disk will contain the parity of the rest of disks. When server read data, it will read for all of disks -1 so that the same data need to be read, the time is shorter, it means faster.

In hardware solution, if one disk is fail, while the computer still running like no problem, you take the fail disk out, and attach the new disk, the raid system will auto rebuild data in new hard disk for you.

In software solution, You have to rescan disks and rebuild the volume through disk manager.

Hope this help.
Quoc

Collapse -

Collapse -

### Riad 5 How it Works ??

This question was closed by the author

• 39

• 25

• 18

• 4