├── images └── googledc.jpg ├── README.md ├── javascripts └── raidcalc.js ├── stylesheets └── cover.css └── index.html /images/googledc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magJ/raid-failure/HEAD/images/googledc.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | raid-failure 2 | ============ 3 | 4 | http://magj.github.io/raid-failure/ 5 | 6 | RAID failure chance calculator. 7 | This is a basic web based calculator to determine the chance of a URE failure during a RAID 5 or RAID 6 rebuild. 8 | 9 | If you would like to request a feature, raise an issue or submit a pull request. 10 | -------------------------------------------------------------------------------- /javascripts/raidcalc.js: -------------------------------------------------------------------------------- 1 | $('#failchanceform').change(processRaidForm); 2 | processRaidForm(); 3 | 4 | function processRaidForm(){ 5 | var type = $('#raidtype option:selected').text(); 6 | var size = $('#drivesize option:selected').val(); 7 | var count = $('#drivecount option:selected').text(); 8 | var ure = $('#ureaverage option:selected').val(); 9 | var chance = calculateRaidFailureChance(type, count, size, ure); 10 | 11 | 12 | $("#resultspan").text(chance.toFixed(2).substring(2) + "%"); 13 | } 14 | 15 | function calculateRaidFailureChance(type, diskCount, disksizeGB, ure){ 16 | var successChance = 1 - Math.pow(10 , -1 * ure); 17 | if(type == "RAID 5"){ 18 | return calculateRaid5FailureChance(diskCount, disksizeGB, successChance); 19 | }else if(type == "RAID 6"){ 20 | return calculateRaid6FailureChance(diskCount, disksizeGB, successChance); 21 | } 22 | } 23 | 24 | function calculateRaid5FailureChance(diskCount, disksizeGB, successChance){ 25 | var readSize = gigabytesToBits((diskCount - 1) * disksizeGB); 26 | return Math.pow(successChance, readSize); 27 | } 28 | 29 | function calculateRaid6FailureChance(diskCount, disksizeGB, successChance){ 30 | var chance1 = 1 - calculateRaid5FailureChance(diskCount, disksizeGB, successChance); 31 | var chance2 = 1 - calculateRaid5FailureChance(diskCount - 1, disksizeGB, successChance); 32 | return 1 - (chance1 * chance2); 33 | } 34 | 35 | function gigabytesToBits(gigs){ 36 | return gigs * 1000 * 1000 * 1000 * 8; 37 | } -------------------------------------------------------------------------------- /stylesheets/cover.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Globals 3 | */ 4 | 5 | /* Links */ 6 | a, 7 | a:focus, 8 | a:hover { 9 | color: #fff; 10 | } 11 | 12 | /* Custom default button */ 13 | .btn-default, 14 | .btn-default:hover, 15 | .btn-default:focus { 16 | color: #333; 17 | text-shadow: none; /* Prevent inheritence from `body` */ 18 | background-color: #fff; 19 | border: 1px solid #fff; 20 | } 21 | 22 | 23 | /* 24 | * Base structure 25 | */ 26 | 27 | html, 28 | body { 29 | height: 100%; 30 | background-color: #333; 31 | } 32 | body { 33 | color: #fff; 34 | text-align: center; 35 | text-shadow: 0 1px 3px rgba(0,0,0,.5); 36 | background-size:cover; 37 | background-position: center; 38 | background-image: url("../images/googledc.jpg"); 39 | */} 40 | 41 | /* Extra markup and styles for table-esque vertical and horizontal centering */ 42 | .site-wrapper { 43 | display: table; 44 | width: 100%; 45 | height: 100%; /* For at least Firefox */ 46 | min-height: 100%; 47 | -webkit-box-shadow: inset 0 0 100px rgb(0,0,0); 48 | box-shadow: inset 0 0 100px rgb(0,0,0); 49 | } 50 | .site-wrapper-inner { 51 | display: table-cell; 52 | vertical-align: top; 53 | } 54 | .cover-container { 55 | margin-right: auto; 56 | margin-left: auto; 57 | } 58 | 59 | /* Padding for spacing */ 60 | .inner { 61 | padding: 30px; 62 | } 63 | 64 | 65 | /* 66 | * Header 67 | */ 68 | .masthead-brand { 69 | margin-top: 10px; 70 | margin-bottom: 10px; 71 | } 72 | 73 | .masthead-nav > li { 74 | display: inline-block; 75 | } 76 | .masthead-nav > li + li { 77 | margin-left: 20px; 78 | } 79 | .masthead-nav > li > a { 80 | padding-right: 0; 81 | padding-left: 0; 82 | font-size: 16px; 83 | font-weight: bold; 84 | color: #fff; /* IE8 proofing */ 85 | color: rgba(255,255,255,.75); 86 | border-bottom: 2px solid transparent; 87 | } 88 | .masthead-nav > li > a:hover, 89 | .masthead-nav > li > a:focus { 90 | background-color: transparent; 91 | border-bottom-color: #a9a9a9; 92 | border-bottom-color: rgba(255,255,255,.25); 93 | } 94 | .masthead-nav > .active > a, 95 | .masthead-nav > .active > a:hover, 96 | .masthead-nav > .active > a:focus { 97 | color: #fff; 98 | border-bottom-color: #fff; 99 | } 100 | 101 | @media (min-width: 768px) { 102 | .masthead-brand { 103 | float: left; 104 | } 105 | .masthead-nav { 106 | float: right; 107 | } 108 | } 109 | 110 | 111 | /* 112 | * Cover 113 | */ 114 | 115 | .cover { 116 | background: none repeat scroll 0 0 rgba(20, 20, 20, 0.8); 117 | border-radius: 20px; 118 | padding: 50px; 119 | } 120 | .cover .btn-lg { 121 | padding: 10px 20px; 122 | font-weight: bold; 123 | } 124 | 125 | 126 | /* 127 | * Footer 128 | */ 129 | 130 | .mastfoot { 131 | color: #999; /* IE8 proofing */ 132 | color: rgba(255,255,255,.5); 133 | } 134 | 135 | 136 | /* 137 | * Affix and center 138 | */ 139 | 140 | @media (min-width: 768px) { 141 | /* Pull out the header and footer */ 142 | .masthead { 143 | position: fixed; 144 | top: 0; 145 | } 146 | .mastfoot { 147 | position: fixed; 148 | bottom: 0; 149 | } 150 | /* Start the vertical centering */ 151 | .site-wrapper-inner { 152 | vertical-align: middle; 153 | } 154 | /* Handle the widths */ 155 | .masthead, 156 | .mastfoot, 157 | .cover-container { 158 | width: 100%; /* Must be percentage or pixels for horizontal alignment */ 159 | } 160 | } 161 | 162 | @media (min-width: 992px) { 163 | .masthead, 164 | .mastfoot, 165 | .cover-container { 166 | width: 700px; 167 | } 168 | } 169 | 170 | #resultspan{ 171 | font-size: 40px 172 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | RAID rebuild failure chance calculator. 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 | 30 |
31 | 32 |
33 |

RAID rebuild failure chance calculator.

34 |

This calculator determines the chance of a RAID rebuild failing due to an unrecoverable read error. The calculator makes a number of assumptions.

35 |

Other types of drive errors and failures are not considered as part of this calculator.

36 |
37 |
38 | 39 |
40 | 44 |
45 |
46 |
47 | 48 |
49 | 63 |
64 |
65 |
66 | 67 |
68 | 87 |
88 |
89 |
90 | 91 |
92 | 103 |
104 |
105 |
106 |

Errorless rebuild success chance:

107 |

108 |
109 | 110 |
111 |
112 |

Project maintained by magJ

113 |

For any suggestions or corrections View the Project on GitHub magJ/raid-failure

114 |
115 |
116 | 117 |
118 | 119 |
120 | 121 |
122 | 123 | 124 | 125 | 126 | --------------------------------------------------------------------------------