{"id":615,"date":"2012-03-10T18:22:39","date_gmt":"2012-03-10T18:22:39","guid":{"rendered":"http:\/\/joelinoff.com\/blog\/?p=615"},"modified":"2012-03-12T21:30:35","modified_gmt":"2012-03-12T21:30:35","slug":"raid-configuration-analysis-tool-in-python","status":"publish","type":"post","link":"https:\/\/joelinoff.com\/blog\/?p=615","title":{"rendered":"RAID Configuration Analysis Tool in Python"},"content":{"rendered":"<p>I have written a RAID configuration analysis tool to help me configure filers. It reports the mean time to data loss (MTTDL), the amount of storage available in a JBOD, the number of possible spares and a other useful information. I am releasing it on the hope that other folks that are trying to figure out how many disks to bundle in a RAID configuration (vdev) will find it useful.<\/p>\n<h1>Download<\/h1>\n<table>\n<thead>\n<tr>\n<th>File<\/th>\n<th>Size<\/th>\n<th>Checksum<\/th>\n<th>Version<\/th>\n<th>Type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"LEFT\"><a href=\"http:\/\/downloads.joelinoff.com\/raid.py\" title=\"raid.py\">raid.py<\/a><\/td>\n<td align=\"RIGHT\">23K<\/td>\n<td align=\"RIGHT\">60577 27<\/td>\n<td align=\"RIGHT\">1.2<\/td>\n<td align=\"LEFT\">Python source code<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><!--more--><\/p>\n<h1>Sample Output<\/h1>\n<p>This report shows the trade offs for having between 3 and 8 disks in a vdev (RAID configuration) for a number of different RAID options. It was created by running the following command.<\/p>\n<p>[crayon type=&#8221;bash&#8221; toolbar=&#8221;always&#8221; title=&#8221;How to Run It&#8221;]<br \/>\n% python raid.py -n 3-8 -s 2 \\<br \/>\n    -d &#8216;Seagate Barracuda ST2000DM001&#8217; \\<br \/>\n    &#8211;mtbf 750000 &#8211;mttr 24<br \/>\n[\/crayon]<br \/>\nHere is the report.<\/p>\n<pre>\r\n                          MTTDL RAID Configuration Report\r\n                           Seagate Barracuda ST2000DM001\r\n                               MTBF: 750,000 (85.6)\r\n                                     MTTR: 24\r\n                                Disk Size: 2.000TB\r\n                                 JBOD Capacity: 24\r\n\r\n      MTTDL    MTTDL                \r\nN  P  (hrs)    (yrs)    AFR       FT DC %   DC   Min C  BD B  S  JDC   Types\r\n== == ======== ======== ========= == ====== ==== === == == == == ===== ============\r\n 3  0  2.5e+05     28.5      3.5%  0 100.0%  6.0   1 24 21  7  3  42.0 RAID-0\r\n 3  1 3.91e+09 4.46e+05 0.000224%  1  50.0%  3.0   2 24 21  7  3  21.0 RAID-1\/10\/01\r\n 3  1 3.91e+09 4.46e+05 0.000224%  1  66.7%  4.0   2 24 21  7  3  28.0 RAID-5\/Z1\r\n 3  2 1.22e+14 1.39e+10 7.18e-09%  2  33.3%  2.0   3 24 21  7  3  14.0 RAID-6\/Z2\r\n 3  2 1.22e+14 1.39e+10 7.18e-09%  2  33.3%  2.0   3 24 21  7  3  14.0 RAID-10(M=2)\r\n\r\n 4  0 1.88e+05     21.4     4.67%  0 100.0%  8.0   1 24 20  5  4  40.0 RAID-0\r\n 4  1 1.95e+09 2.23e+05 0.000449%  1  50.0%  4.0   2 24 20  5  4  20.0 RAID-1\/10\/01\r\n 4  1 1.95e+09 2.23e+05 0.000449%  1  75.0%  6.0   2 24 20  5  4  30.0 RAID-5\/Z1\r\n 4  2 3.05e+13 3.48e+09 2.87e-08%  2  50.0%  4.0   3 24 20  5  4  20.0 RAID-6\/Z2\r\n 4  3 9.54e+17 1.09e+14 9.19e-13%  3  25.0%  2.0   4 24 20  5  4  10.0 RAID-Z3\r\n 4  3 9.54e+17 1.09e+14 9.19e-13%  3  25.0%  2.0   4 24 20  5  4  10.0 RAID-10(M=3)\r\n\r\n 5  0  1.5e+05     17.1     5.84%  0 100.0% 10.0   1 24 20  4  4  40.0 RAID-0\r\n 5  1 1.17e+09 1.34e+05 0.000748%  1  50.0%  5.0   2 24 20  4  4  20.0 RAID-1\/10\/01\r\n 5  1 1.17e+09 1.34e+05 0.000748%  1  80.0%  8.0   2 24 20  4  4  32.0 RAID-5\/Z1\r\n 5  2 1.22e+13 1.39e+09 7.18e-08%  2  60.0%  6.0   3 24 20  4  4  24.0 RAID-6\/Z2\r\n 5  3 1.91e+17 2.18e+13 4.59e-12%  3  40.0%  4.0   4 24 20  4  4  16.0 RAID-Z3\r\n 5  4 5.96e+21  6.8e+17 1.47e-16%  4  20.0%  2.0   5 24 20  4  4   8.0 RAID-10(M=4)\r\n\r\n 6  0 1.25e+05     14.3     7.01%  0 100.0% 12.0   1 24 18  3  6  36.0 RAID-0\r\n 6  1 7.81e+08 8.92e+04  0.00112%  1  50.0%  6.0   2 24 18  3  6  18.0 RAID-1\/10\/01\r\n 6  1 7.81e+08 8.92e+04  0.00112%  1  83.3% 10.0   2 24 18  3  6  30.0 RAID-5\/Z1\r\n 6  2  6.1e+12 6.97e+08 1.44e-07%  2  66.7%  8.0   3 24 18  3  6  24.0 RAID-6\/Z2\r\n 6  3 6.36e+16 7.26e+12 1.38e-11%  3  50.0%  6.0   4 24 18  3  6  18.0 RAID-Z3\r\n 6  5  3.1e+25 3.54e+21 2.82e-20%  5  16.7%  2.0   6 24 18  3  6   6.0 RAID-10(M=5)\r\n\r\n 7  0 1.07e+05     12.2     8.18%  0 100.0% 14.0   1 24 21  3  3  42.0 RAID-0\r\n 7  1 5.58e+08 6.37e+04  0.00157%  1  50.0%  7.0   2 24 21  3  3  21.0 RAID-1\/10\/01\r\n 7  1 5.58e+08 6.37e+04  0.00157%  1  85.7% 12.0   2 24 21  3  3  36.0 RAID-5\/Z1\r\n 7  2 3.49e+12 3.98e+08 2.51e-07%  2  71.4% 10.0   3 24 21  3  3  30.0 RAID-6\/Z2\r\n 7  3 2.72e+16 3.11e+12 3.21e-11%  3  57.1%  8.0   4 24 21  3  3  24.0 RAID-Z3\r\n 7  6 1.39e+29 1.58e+25 6.32e-24%  6  14.3%  2.0   7 24 21  3  3   6.0 RAID-10(M=6)\r\n\r\n 8  0 9.38e+04     10.7     9.34%  0 100.0% 16.0   1 24 16  2  8  32.0 RAID-0\r\n 8  1 4.19e+08 4.78e+04  0.00209%  1  50.0%  8.0   2 24 16  2  8  16.0 RAID-1\/10\/01\r\n 8  1 4.19e+08 4.78e+04  0.00209%  1  87.5% 14.0   2 24 16  2  8  28.0 RAID-5\/Z1\r\n 8  2 2.18e+12 2.49e+08 4.02e-07%  2  75.0% 12.0   3 24 16  2  8  24.0 RAID-6\/Z2\r\n 8  3 1.36e+16 1.56e+12 6.43e-11%  3  62.5% 10.0   4 24 16  2  8  20.0 RAID-Z3\r\n 8  7 5.41e+32 6.18e+28 1.62e-27%  7  12.5%  2.0   8 24 16  2  8   4.0 RAID-10(M=7)\r\n\r\n\r\n             Term    Definition\r\n             ======= ================================================\r\n             AFR     Annualized Failure Rate in years\r\n             B       Number of RAID blocks\r\n             BD      Number of RAID block disks\r\n             C       JBOD capacity (number of disks)\r\n             DC      RAID data capacity (TB)\r\n             FT      Fault Tolerance: max bad disks with no data loss\r\n             JDC     JBOD data capacity in TB\r\n             Min     Minimum number of disks allowed\r\n             MTBF    Mean Time Between Failures in hours\r\n             MTTDL   Mean Time To Data Loss in hours\r\n             MTTR    Mean Time To Recover (repair) in hours\r\n             N       Number of disks in each RAID array\r\n             P       Parity\r\n             S       Spares, must be greater than zero\r\n<\/pre>\n<h1>Sample CSV Output<\/h1>\n<p>This report shows the trade offs for having between 3 and 8 disks in a vdev (RAID configuration) for a RAID-Z2 configuration in CSV format for use in a spreadsheet. It was created by running the following command.<\/p>\n<p>[crayon type=&#8221;bash&#8221; toolbar=&#8221;always&#8221; title=&#8221;How to Run It&#8221;]<br \/>\n% python raid.py -n 3-8 -s 2 \\<br \/>\n    -d &#8216;Seagate Barracuda ST2000DM001&#8217; \\<br \/>\n    &#8211;mtbf 750000 &#8211;mttr 24 \\<br \/>\n    -f &#8216;Z2&#8217; &#8211;csv<br \/>\n[\/crayon]<br \/>\nHere is the generated CSV data.<\/p>\n<pre>\r\nDisk,Seagate Barracuda ST2000DM001\r\nSize,2.000\r\nMTBF,750000\r\nMTTR,24\r\n\r\n,,N,Parity,MTTDL (hrs),MTTDL (yrs),AFR,FT,DC %,DC,Min,C,BD,B,S,JDC,Types\r\n,,3,2,1.22e+14,1.39e+10,7.1762e-11,2,0.333,2.0,3,24,21,7,3,14.0,RAID-6\/Z2\r\n,,4,2,3.05e+13,3.48e+09,2.8705e-10,2,0.500,4.0,3,24,20,5,4,20.0,RAID-6\/Z2\r\n,,5,2,1.22e+13,1.39e+09,7.1762e-10,2,0.600,6.0,3,24,20,4,4,24.0,RAID-6\/Z2\r\n,,6,2,6.1e+12,6.97e+08,1.4352e-09,2,0.667,8.0,3,24,18,3,6,24.0,RAID-6\/Z2\r\n,,7,2,3.49e+12,3.98e+08,2.5117e-09,2,0.714,10.0,3,24,21,3,3,30.0,RAID-6\/Z2\r\n,,8,2,2.18e+12,2.49e+08,4.0187e-09,2,0.750,12.0,3,24,16,2,8,24.0,RAID-6\/Z2\r\n<\/pre>\n<h1>Report Comparing Storage for Z1, Z2, Z3 for n [3-8]<\/h1>\n<p>This report shows how Z1, Z2 and Z3 storage varies for different values of n.<br \/>\n[crayon type=&#8221;bash&#8221; toolbar=&#8221;always&#8221; title=&#8221;How to Run It&#8221;]<br \/>\n#!\/bin\/bash<br \/>\npython raid.py -n 3-8 -s 2 \\<br \/>\n    -d &#8216;Seagate Barracuda ST2000DM001&#8217; \\<br \/>\n    &#8211;mtbf 750000 &#8211;mttr 24  -f &#8216;Z1&#8217; \\<br \/>\n    &#8211;no-key<\/p>\n<p>python raid.py -n 3-8 -s 2 \\<br \/>\n    -d &#8216;Seagate Barracuda ST2000DM001&#8217; \\<br \/>\n    &#8211;mtbf 750000 &#8211;mttr 24  -f &#8216;Z2&#8217; \\<br \/>\n    &#8211;no-title &#8211;no-header &#8211;no-key<\/p>\n<p>python raid.py -n 3-8 -s 2 \\<br \/>\n    -d &#8216;Seagate Barracuda ST2000DM001&#8217; \\<br \/>\n    &#8211;mtbf 750000 &#8211;mttr 24  -f &#8216;Z3&#8217; \\<br \/>\n    &#8211;no-title &#8211;no-header &#8211;no-key<br \/>\n[\/crayon]<br \/>\nHere is the report.<\/p>\n<pre>\r\n\r\n                          MTTDL RAID Configuration Report\r\n                           Seagate Barracuda ST2000DM001\r\n                               MTBF: 750,000 (85.6)\r\n                                     MTTR: 24\r\n                                Disk Size: 2.000TB\r\n                                 JBOD Capacity: 24\r\n\r\n      MTTDL    MTTDL\r\nN  P  (hrs)    (yrs)    AFR       FT DC %   DC   Min C  BD B  S  JDC   Types\r\n== == ======== ======== ========= == ====== ==== === == == == == ===== ============\r\n 3  1 3.91e+09 4.46e+05 0.000224%  1  66.7%  4.0   2 24 21  7  3  28.0 RAID-5\/Z1\r\n 4  1 1.95e+09 2.23e+05 0.000449%  1  75.0%  6.0   2 24 20  5  4  30.0 RAID-5\/Z1\r\n 5  1 1.17e+09 1.34e+05 0.000748%  1  80.0%  8.0   2 24 20  4  4  32.0 RAID-5\/Z1\r\n 6  1 7.81e+08 8.92e+04  0.00112%  1  83.3% 10.0   2 24 18  3  6  30.0 RAID-5\/Z1\r\n 7  1 5.58e+08 6.37e+04  0.00157%  1  85.7% 12.0   2 24 21  3  3  36.0 RAID-5\/Z1\r\n 8  1 4.19e+08 4.78e+04  0.00209%  1  87.5% 14.0   2 24 16  2  8  28.0 RAID-5\/Z1\r\n\r\n 3  2 1.22e+14 1.39e+10 7.18e-09%  2  33.3%  2.0   3 24 21  7  3  14.0 RAID-6\/Z2\r\n 4  2 3.05e+13 3.48e+09 2.87e-08%  2  50.0%  4.0   3 24 20  5  4  20.0 RAID-6\/Z2\r\n 5  2 1.22e+13 1.39e+09 7.18e-08%  2  60.0%  6.0   3 24 20  4  4  24.0 RAID-6\/Z2\r\n 6  2  6.1e+12 6.97e+08 1.44e-07%  2  66.7%  8.0   3 24 18  3  6  24.0 RAID-6\/Z2\r\n 7  2 3.49e+12 3.98e+08 2.51e-07%  2  71.4% 10.0   3 24 21  3  3  30.0 RAID-6\/Z2\r\n 8  2 2.18e+12 2.49e+08 4.02e-07%  2  75.0% 12.0   3 24 16  2  8  24.0 RAID-6\/Z2\r\n\r\n 4  3 9.54e+17 1.09e+14 9.19e-13%  3  25.0%  2.0   4 24 20  5  4  10.0 RAID-Z3\r\n 5  3 1.91e+17 2.18e+13 4.59e-12%  3  40.0%  4.0   4 24 20  4  4  16.0 RAID-Z3\r\n 6  3 6.36e+16 7.26e+12 1.38e-11%  3  50.0%  6.0   4 24 18  3  6  18.0 RAID-Z3\r\n 7  3 2.72e+16 3.11e+12 3.21e-11%  3  57.1%  8.0   4 24 21  3  3  24.0 RAID-Z3\r\n 8  3 1.36e+16 1.56e+12 6.43e-11%  3  62.5% 10.0   4 24 16  2  8  20.0 RAID-Z3\r\n<\/pre>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have written a RAID configuration analysis tool to help me configure filers. It reports the mean time to data loss (MTTDL), the amount of storage available in a JBOD, the number of possible spares and a other useful information. I am releasing it on the hope that other folks that are trying to figure &hellip; <a href=\"https:\/\/joelinoff.com\/blog\/?p=615\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">RAID Configuration Analysis Tool in Python<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/615"}],"collection":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=615"}],"version-history":[{"count":10,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/615\/revisions"}],"predecessor-version":[{"id":624,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/615\/revisions\/624"}],"wp:attachment":[{"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joelinoff.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}