{"id":973,"date":"2010-09-03T14:06:41","date_gmt":"2010-09-03T14:06:41","guid":{"rendered":"http:\/\/blog.open-e.com\/?p=973"},"modified":"2025-07-03T07:49:56","modified_gmt":"2025-07-03T07:49:56","slug":"how-does-raid-5-work","status":"publish","type":"post","link":"https:\/\/www.open-e.com\/blog\/how-does-raid-5-work\/","title":{"rendered":"How does RAID 5 work? The Shortest and Easiest explanation ever!"},"content":{"rendered":"<p>\t\t\t\t<strong>We all have limited time to study long and complicated information about RAID theories, but you may be interested as to how RAID 5 works. We made it simple for you by providing the shortest and easiest explanation ever. <\/strong><\/p>\n<h3>RAID 5 &#8211; how it works?<strong><br \/>\n<\/strong><\/h3>\n<p>First we need to remind you XOR definition:<\/p>\n<p>XOR function result is equal 1 if both arguments are different.<\/p>\n<p>XOR (0, 1) = 1<br \/>\nXOR (1, 0) = 1<\/p>\n<p>XOR function output is equal 0 if both arguments are same.<\/p>\n<p>XOR (0, 0) = 0<br \/>\nXOR (1, 1) = 0<\/p>\n<p>Now let us assume we have 3 drives with the following bits:<\/p>\n<p>| 101\u00a0| 010 | 011 |<\/p>\n<p>And we calculate XOR of those data and place it on 4<sup>th<\/sup> drive<\/p>\n<p>XOR (101, 010, 011) = 100\u00a0\u00a0\u00a0\u00a0 (XOR (101,010) = 111 and then XOR (111, 011) = 100<\/p>\n<p>So the data on the four drives looks like this below:<\/p>\n<p>| 101 | 010 | 011 | <strong>100<\/strong> |<\/p>\n<p>Now let\u2019s see how the XOR MAGIC works. Let\u2019s assume the second drive has failed. When we calculate XOR all the remaining data will be present from the missing drive.<\/p>\n<p>| 101 | <span style=\"color: red;\"><strong><em><span style=\"text-decoration: line-through;\">010<\/span><\/em> <\/strong><\/span> | 011 | 100 |<\/p>\n<p>XOR (101, 011, 100) = 010<\/p>\n<p>You can check the missing other\u00a0drives and XOR of the remaining data will always give you exactly the data of your\u00a0missing drive.<\/p>\n<p>| 101 | 010 | <span style=\"color: red;\"><strong><em><span style=\"text-decoration: line-through;\">011<\/span><\/em><\/strong><\/span> | 100 |<\/p>\n<p>XOR (101, 010, 100) = 011<\/p>\n<p>What works for 3 bits and 4 drives only, works for any number of bits and any number of drives. Real RAID 5 has the most common stripe size of 64k (65536 * 8 = 524288 bits )<\/p>\n<p>So the real XOR engine only needs to deal with 524288 bits and not 3 bits as in our exercise. This is why the RAID 5 needs a very efficient XOR engine in order to calculate it fast.<\/p>\n<p>So when adding one drive for parity you will be able to rebuild the missing data in case of any drive failure.<\/p>\n<p>In our example we have explained RAID 4 where parity is on a dedicated drive. RAID 5 will distribute parities evenly between all drives. Distributed parity provides a slight increase in performance but the XOR magic is the same.<\/p>\n<p>To learn more about RAID 5 please go to Wikipedia <a href=\"https:\/\/en.wikipedia.org\/wiki\/RAID_5\">article<\/a>.<\/p>\n<h3>RAID &#8211; The Series. Check out:<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.open-e.com\/blog\/what-is-raid-0\/\" target=\"_blank\" rel=\"noopener\">RAID 0<\/a><\/li>\n<li><a href=\"https:\/\/www.open-e.com\/blog\/what-are-raid-1-raid-10-and-raid-01\/\" target=\"_blank\" rel=\"noopener\">RAID 1, RAID 1+0 and RAID 0+1 <\/a><\/li>\n<li><a href=\"https:\/\/www.open-e.com\/blog\/raid-2-raid-3-raid-4-what-it-is-how-it-works-the-history-lesson\/\">RAID 2, RAID 3, RAID 4<\/a><\/li>\n<li><a href=\"https:\/\/www.open-e.com\/blog\/raid-5-raid-6-or-other-alternativee\/\">RAID 5, RAID 6, RAID 5E, RAID 5EE<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.open-e.com\/products\/open-e-data-storage-software-v7\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28013\" title=\"Data Storage Software V7\" src=\"https:\/\/www.open-e.com\/blog\/wp-content\/uploads\/2010\/09\/blog_open-e.png\" alt=\"Download DSS V7\" width=\"578\" height=\"94\" srcset=\"https:\/\/www.open-e.com\/blog\/wp-content\/uploads\/2010\/09\/blog_open-e.png 578w, https:\/\/www.open-e.com\/blog\/wp-content\/uploads\/2010\/09\/blog_open-e-570x94.png 570w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/a><\/p>\n<hr \/>\n<h3>RAID Calculator<\/h3>\n<p>We know that your data is priceless \u2013 calculate how many disks you need to get it safe!<\/p>\n<p><a href=\"https:\/\/www.open-e.com\/raid-calculator\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-36973 aligncenter\" src=\"https:\/\/www.open-e.com\/blog\/wp-content\/uploads\/2013\/12\/button-3.png\" alt=\"RAID Calculator\" width=\"228\" height=\"37\" \/><\/a><\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>We all have limited time to study long and complicated information about RAID theories, but you may be interested as to how RAID 5 works. We made it simple for&nbsp;&#8230;<\/p>\n","protected":false},"author":2,"featured_media":55750,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[18,28],"tags":[293,296,523,539,552,634,749],"class_list":["post-973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hardware","category-raid","tag-hard-disk","tag-hardware-2","tag-raid","tag-raid5","tag-rebuild","tag-storage","tag-xor-magic"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts\/973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/comments?post=973"}],"version-history":[{"count":1,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts\/973\/revisions"}],"predecessor-version":[{"id":55798,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/posts\/973\/revisions\/55798"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/media\/55750"}],"wp:attachment":[{"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/media?parent=973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/categories?post=973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.open-e.com\/blog\/wp-json\/wp\/v2\/tags?post=973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}