{"id":181463,"date":"2020-05-06T00:43:01","date_gmt":"2020-05-05T16:43:01","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=181463"},"modified":"2022-10-28T00:24:38","modified_gmt":"2022-10-27T16:24:38","slug":"basic-learning-07","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/basic-learning-07.html","title":{"rendered":"\u7b2c7\u7ae0 \u4f7f\u7528RAID\u4e0eLVM\u78c1\u76d8\u9635\u5217\u6280\u672f"},"content":{"rendered":"
\u7ae0\u8282\u7b80\u8ff0\uff1a<\/strong><\/span><\/p>\n \u5728\u5b66\u4e60\u4e86\u7b2c6\u7ae0\u8bb2\u89e3\u7684\u786c\u76d8\u8bbe\u5907\u5206\u533a\u3001\u683c\u5f0f\u5316\u3001\u6302\u8f7d\u7b49\u77e5\u8bc6\u540e\uff0c\u672c\u7ae0\u5c06\u6df1\u5165\u8bb2\u89e3\u5404\u4e2a\u5e38\u7528RAID\uff08Redundant Array of Independent Disks\uff0c\u72ec\u7acb\u5197\u4f59\u78c1\u76d8\u9635\u5217\uff09\u6280\u672f\u65b9\u6848\u7684\u7279\u6027\uff0c\u5e76\u901a\u8fc7\u5b9e\u9645\u90e8\u7f72RAID 10\u3001RAID 5+\u5907\u4efd\u76d8\u7b49\u65b9\u6848\u6765\u66f4\u76f4\u89c2\u5730\u67e5\u770bRAID\u7684\u5f3a\u5927\u6548\u679c\uff0c\u4ee5\u4fbf\u8fdb\u4e00\u6b65\u6ee1\u8db3\u751f\u4ea7\u73af\u5883\u5bf9\u786c\u76d8\u8bbe\u5907\u7684IO\u8bfb\u5199\u901f\u5ea6\u548c\u6570\u636e\u5197\u4f59\u5907\u4efd\u673a\u5236\u7684\u9700\u6c42\u3002\u540c\u65f6\uff0c\u8003\u8651\u5230\u7528\u6237\u53ef\u80fd\u4f1a\u52a8\u6001\u8c03\u6574\u5b58\u50a8\u8d44\u6e90\uff0c\u672c\u7ae0\u8fd8\u5c06\u4ecb\u7ecdLVM\uff08Logical Volume Manager\uff0c\u903b\u8f91\u5377\u7ba1\u7406\u5668\uff09\u7684\u90e8\u7f72\u3001\u6269\u5bb9\u3001\u7f29\u5c0f\u3001\u5feb\u7167\u4ee5\u53ca\u5378\u8f7d\u5220\u9664\u7684\u76f8\u5173\u77e5\u8bc6\u3002\u76f8\u4fe1\u8bfb\u8005\u5728\u5b66\u5b8c\u672c\u7ae0\u5185\u5bb9\u540e\uff0c\u53ef\u4ee5\u5728\u4f01\u4e1a\u7ea7\u751f\u4ea7\u73af\u5883\u4e2d\u7075\u6d3b\u8fd0\u7528RAID\u548cLVM\u6765\u6ee1\u8db3\u5bf9\u5b58\u50a8\u8d44\u6e90\u7684\u9ad8\u7ea7\u7ba1\u7406\u9700\u6c42\u3002<\/p>\n \u8fd1\u5e74\u6765\uff0cCPU\u7684\u5904\u7406\u6027\u80fd\u4fdd\u6301\u7740\u9ad8\u901f\u589e\u957f\u30022017\u5e74\uff0cIntel\u516c\u53f8\u53d1\u5e03\u4e86i9-7980XE\u5904\u7406\u5668\u82af\u7247\uff0c\u7387\u5148\u8ba9\u5bb6\u7528\u7535\u8111\u8fbe\u5230\u4e8618\u6838\u5fc336\u7ebf\u7a0b\u30022020\u5e74\u672b\uff0cAMD\u516c\u53f8\u53c8\u63a8\u51fa\u4e86\u201c\u7ebf\u7a0b\u6495\u88c2\u8005\u201d\u7cfb\u7edf\u5904\u7406\u56683990X\uff0c\u5bb6\u7528\u7535\u8111\u81ea\u6b64\u4e5f\u53ef\u4ee5\u8f7b\u677e\u9a7e\u9a6d64\u6838\u5fc3128\u7ebf\u7a0b\u7684\u5904\u7406\u5668\u5c0f\u602a\u517d\u4e86\u3002\u4f46\u4e0e\u6b64\u540c\u65f6\uff0c\u786c\u76d8\u8bbe\u5907\u7684\u6027\u80fd\u63d0\u5347\u5374\u4e0d\u662f\u5f88\u5927\uff0c\u9010\u6e10\u6210\u4e3a\u5f53\u4ee3\u8ba1\u7b97\u673a\u6574\u4f53\u6027\u80fd\u7684\u74f6\u9888\u3002\u800c\u4e14\uff0c\u7531\u4e8e\u786c\u76d8\u8bbe\u5907\u9700\u8981\u8fdb\u884c\u6301\u7eed\u3001\u9891\u7e41\u3001\u5927\u91cf\u7684IO\u64cd\u4f5c\uff0c\u76f8\u8f83\u4e8e\u5176\u4ed6\u8bbe\u5907\uff0c\u5176\u635f\u574f\u51e0\u7387\u4e5f\u5927\u5e45\u589e\u52a0\uff0c\u5bfc\u81f4\u91cd\u8981\u6570\u636e\u4e22\u5931\u7684\u51e0\u7387\u4e5f\u968f\u4e4b\u589e\u52a0\u3002<\/p>\n \u786c\u76d8\u8bbe\u5907\u662f\u8ba1\u7b97\u673a\u4e2d\u8f83\u5bb9\u6613\u51fa\u73b0\u6545\u969c\u7684\u5143\u5668\u4ef6\u4e4b\u4e00\uff0c\u52a0\u4e4b\u7531\u4e8e\u5176\u9700\u8981\u5b58\u50a8\u6570\u636e\u7684\u7279\u6b8a\u6027\u8d28\uff0c\u4e0d\u80fd\u50cfCPU\u3001\u5185\u5b58\u3001\u7535\u6e90\u751a\u81f3\u4e3b\u677f\u90a3\u6837\u5728\u51fa\u73b0\u6545\u969c\u540e\u66f4\u6362\u65b0\u7684\u5c31\u597d\uff0c\u6240\u4ee5\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4e00\u5b9a\u8981\u672a\u96e8\u7ef8\u7f2a\uff0c\u63d0\u524d\u505a\u597d\u6570\u636e\u7684\u5197\u4f59\u53ca\u5f02\u5730\u5907\u4efd\u7b49\u5de5\u4f5c\u3002<\/p>\n 1988\u5e74\uff0c\u7f8e\u56fd\u52a0\u5229\u798f\u5c3c\u4e9a\u5927\u5b66\u4f2f\u514b\u5229\u5206\u6821\u9996\u6b21\u63d0\u51fa\u5e76\u5b9a\u4e49\u4e86RAID\u6280\u672f\u7684\u6982\u5ff5\u3002RAID\u6280\u672f\u901a\u8fc7\u628a\u591a\u4e2a\u786c\u76d8\u8bbe\u5907\u7ec4\u5408\u6210\u4e00\u4e2a\u5bb9\u91cf\u66f4\u5927\u3001\u5b89\u5168\u6027\u66f4\u597d\u7684\u78c1\u76d8\u9635\u5217\uff0c\u5e76\u628a\u6570\u636e\u5207\u5272\u6210\u591a\u4e2a\u533a\u6bb5\u540e\u5206\u522b\u5b58\u653e\u5728\u5404\u4e2a\u4e0d\u540c\u7684\u7269\u7406\u786c\u76d8\u8bbe\u5907\u4e0a\uff0c\u7136\u540e\u5229\u7528\u5206\u6563\u8bfb\u5199\u6280\u672f\u6765\u63d0\u5347\u78c1\u76d8\u9635\u5217\u6574\u4f53\u7684\u6027\u80fd\uff0c\u540c\u65f6\u628a\u591a\u4e2a\u91cd\u8981\u6570\u636e\u7684\u526f\u672c\u540c\u6b65\u5230\u4e0d\u540c\u7684\u7269\u7406\u786c\u76d8\u8bbe\u5907\u4e0a\uff0c\u4ece\u800c\u8d77\u5230\u4e86\u975e\u5e38\u597d\u7684\u6570\u636e\u5197\u4f59\u5907\u4efd\u6548\u679c\u3002<\/p>\n \u4efb\u4f55\u4e8b\u7269\u90fd\u6709\u5b83\u7684\u4e24\u9762\u6027\u3002RAID\u6280\u672f\u786e\u5b9e\u5177\u6709\u975e\u5e38\u597d\u7684\u6570\u636e\u5197\u4f59\u5907\u4efd\u529f\u80fd\uff0c\u4f46\u662f\u5b83\u4e5f\u76f8\u5e94\u5730\u63d0\u9ad8\u4e86\u6210\u672c\u652f\u51fa\u3002\u5c31\u50cf\u539f\u672c\u6211\u4eec\u53ea\u6709\u4e00\u4e2a\u7535\u8bdd\u672c\uff0c\u4f46\u662f\u4e3a\u4e86\u907f\u514d\u9057\u5931\uff0c\u6211\u4eec\u628a\u8054\u7cfb\u4eba\u53f7\u7801\u4fe1\u606f\u5199\u6210\u4e86\u4e24\u4efd\uff0c\u81ea\u7136\u8981\u4e3a\u6b64\u591a\u4e70\u4e00\u4e2a\u7535\u8bdd\u672c\uff0c\u8fd9\u4e5f\u5c31\u76f8\u5e94\u5730\u63d0\u5347\u4e86\u6210\u672c\u652f\u51fa\u3002RAID\u6280\u672f\u7684\u8bbe\u8ba1\u521d\u8877\u662f\u51cf\u5c11\u56e0\u4e3a\u91c7\u8d2d\u786c\u76d8\u8bbe\u5907\u5e26\u6765\u7684\u8d39\u7528\u652f\u51fa\uff0c\u4f46\u662f\u4e0e\u6570\u636e\u672c\u8eab\u7684\u4ef7\u503c\u76f8\u6bd4\u8f83\uff0c\u73b0\u4ee3\u4f01\u4e1a\u66f4\u770b\u91cd\u7684\u5219\u662fRAID\u6280\u672f\u6240\u5177\u5907\u7684\u5197\u4f59\u5907\u4efd\u673a\u5236\u4ee5\u53ca\u5e26\u6765\u7684\u786c\u76d8\u541e\u5410\u91cf\u7684\u63d0\u5347\u3002\u4e5f\u5c31\u662f\u8bf4\uff0cRAID\u4e0d\u4ec5\u964d\u4f4e\u4e86\u786c\u76d8\u8bbe\u5907\u635f\u574f\u540e\u4e22\u5931\u6570\u636e\u7684\u51e0\u7387\uff0c\u8fd8\u63d0\u5347\u4e86\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\uff0c\u6240\u4ee5\u5b83\u5728\u7edd\u5927\u591a\u6570\u8fd0\u8425\u5546\u6216\u5927\u4e2d\u578b\u4f01\u4e1a\u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u90e8\u7f72\u548c\u5e94\u7528\u3002<\/p>\n \u51fa\u4e8e\u6210\u672c\u548c\u6280\u672f\u65b9\u9762\u7684\u8003\u8651\uff0c\u9700\u8981\u9488\u5bf9\u4e0d\u540c\u7684\u9700\u6c42\u5728\u6570\u636e\u53ef\u9760\u6027\u53ca\u8bfb\u5199\u6027\u80fd\u4e0a\u505a\u51fa\u6743\u8861\uff0c\u5236\u5b9a\u51fa\u6ee1\u8db3\u5404\u81ea\u9700\u6c42\u7684\u4e0d\u540c\u65b9\u6848\u3002\u76ee\u524d\u5df2\u6709\u7684RAID\u78c1\u76d8\u9635\u5217\u7684\u65b9\u6848\u81f3\u5c11\u6709\u5341\u51e0\u79cd\uff0c\u800c\u5218\u9044<\/a>\u8001\u5e08\u63a5\u4e0b\u6765\u4f1a\u8be6\u7ec6\u8bb2\u89e3RAID 0\u3001RAID 1\u3001RAID 5\u4e0eRAID 10\u8fd94\u79cd\u6700\u5e38\u89c1\u7684\u65b9\u6848\u3002\u8fd94\u79cd\u65b9\u6848\u7684\u5bf9\u6bd4\u5982\u88687-1\u6240\u793a\uff0c\u5176\u4e2dn<\/em>\u4ee3\u8868\u786c\u76d8\u603b\u6570\u3002<\/p>\n \u88687-3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RAID 0\u30011\u30015\u300110\u65b9\u6848\u6280\u672f\u5bf9\u6bd4<\/p>\n <\/p>\n 1. RAID 0<\/strong><\/span><\/p>\n RAID 0\u6280\u672f\u628a\u591a\u5757\u7269\u7406\u786c\u76d8\u8bbe\u5907\uff08\u81f3\u5c11\u4e24\u5757\uff09\u901a\u8fc7\u786c\u4ef6\u6216\u8f6f\u4ef6\u7684\u65b9\u5f0f\u4e32\u8054\u5728\u4e00\u8d77\uff0c\u7ec4\u6210\u4e00\u4e2a\u5927\u7684\u5377\u7ec4\uff0c\u5e76\u5c06\u6570\u636e\u4f9d\u6b21\u5199\u5165\u5404\u4e2a\u7269\u7406\u786c\u76d8\u4e2d\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5728\u6700\u7406\u60f3\u7684\u72b6\u6001\u4e0b\uff0c\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u6027\u80fd\u4f1a\u63d0\u5347\u6570\u500d\uff0c\u4f46\u662f\u82e5\u4efb\u610f\u4e00\u5757\u786c\u76d8\u53d1\u751f\u6545\u969c\uff0c\u5c06\u5bfc\u81f4\u6574\u4e2a\u7cfb\u7edf\u7684\u6570\u636e\u90fd\u53d7\u5230\u7834\u574f\u3002\u901a\u4fd7\u6765\u8bf4\uff0cRAID 0\u6280\u672f\u80fd\u591f\u6709\u6548\u5730\u63d0\u5347\u786c\u76d8\u6570\u636e\u7684\u541e\u5410\u901f\u5ea6\uff0c\u4f46\u662f\u4e0d\u5177\u5907\u6570\u636e\u5907\u4efd\u548c\u9519\u8bef\u4fee\u590d\u80fd\u529b\u3002\u5982\u56fe7-1\u6240\u793a\uff0c\u6570\u636e\u88ab\u5206\u522b\u5199\u5165\u5230\u4e0d\u540c\u7684\u786c\u76d8\u8bbe\u5907\u4e2d\uff0c\u5373\u786c\u76d8A\u548c\u786c\u76d8B\u8bbe\u5907\u4f1a\u5206\u522b\u4fdd\u5b58\u6570\u636e\u8d44\u6599\uff0c\u6700\u7ec8\u5b9e\u73b0\u63d0\u5347\u8bfb\u53d6\u3001\u5199\u5165\u901f\u5ea6\u7684\u6548\u679c\u3002<\/p>\n <\/p>\n \u56fe7-1\u00a0 RAID 0\u6280\u672f\u793a\u610f\u56fe<\/p>\n 2. RAID 1<\/strong><\/span><\/p>\n \u5c3d\u7ba1RAID 0\u6280\u672f\u63d0\u5347\u4e86\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\uff0c\u4f46\u5b83\u662f\u5c06\u6570\u636e\u4f9d\u6b21\u5199\u5165\u5230\u5404\u4e2a\u7269\u7406\u786c\u76d8\u4e2d\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5b83\u7684\u6570\u636e\u662f\u5206\u5f00\u5b58\u653e\u7684\uff0c\u5176\u4e2d\u4efb\u4f55\u4e00\u5757\u786c\u76d8\u53d1\u751f\u6545\u969c\u90fd\u4f1a\u635f\u574f\u6574\u4e2a\u7cfb\u7edf\u7684\u6570\u636e\u3002\u56e0\u6b64\uff0c\u5982\u679c\u751f\u4ea7\u73af\u5883\u5bf9\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\u6ca1\u6709\u8981\u6c42\uff0c\u800c\u662f\u5e0c\u671b\u589e\u52a0\u6570\u636e\u7684\u5b89\u5168\u6027\u65f6\uff0c\u5c31\u9700\u8981\u7528\u5230RAID 1\u6280\u672f\u4e86\u3002<\/p>\n \u5728\u56fe7-2\u6240\u793a\u7684RAID 1\u6280\u672f\u793a\u610f\u56fe\u4e2d\u53ef\u4ee5\u770b\u5230\uff0c\u5b83\u662f\u628a\u4e24\u5757\u4ee5\u4e0a\u7684\u786c\u76d8\u8bbe\u5907\u8fdb\u884c\u7ed1\u5b9a\uff0c\u5728\u5199\u5165\u6570\u636e\u65f6\uff0c\u662f\u5c06\u6570\u636e\u540c\u65f6\u5199\u5165\u5230\u591a\u5757\u786c\u76d8\u8bbe\u5907\u4e0a\uff08\u53ef\u4ee5\u5c06\u5176\u89c6\u4e3a\u6570\u636e\u7684\u955c\u50cf\u6216\u5907\u4efd\uff09\u3002\u5f53\u5176\u4e2d\u67d0\u4e00\u5757\u786c\u76d8\u53d1\u751f\u6545\u969c\u540e\uff0c\u4e00\u822c\u4f1a\u7acb\u5373\u81ea\u52a8\u4ee5\u70ed\u4ea4\u6362\u7684\u65b9\u5f0f\u6765\u6062\u590d\u6570\u636e\u7684\u6b63\u5e38\u4f7f\u7528\u3002<\/p>\n <\/p>\n \u56fe7-2\u00a0 RAID 1\u6280\u672f\u793a\u610f\u56fe<\/p>\n \u8003\u8651\u5230\u5728\u8fdb\u884c\u5199\u5165\u64cd\u4f5c\u65f6\u56e0\u786c\u76d8\u5207\u6362\u5e26\u6765\u7684\u5f00\u9500\uff0c\u56e0\u6b64RAID 1\u7684\u901f\u5ea6\u4f1a\u6bd4RAID 0\u6709\u5fae\u5f31\u5730\u964d\u4f4e\u3002\u4f46\u5728\u8bfb\u53d6\u6570\u636e\u7684\u65f6\u5019\uff0c\u64cd\u4f5c\u7cfb\u7edf\u53ef\u4ee5\u5206\u522b\u4ece\u4e24\u5757\u786c\u76d8\u4e2d\u8bfb\u53d6\u4fe1\u606f\uff0c\u56e0\u6b64\u7406\u8bba\u8bfb\u53d6\u901f\u5ea6\u7684\u5cf0\u503c\u53ef\u4ee5\u662f\u786c\u76d8\u6570\u91cf\u7684\u500d\u6570\u3002\u53e6\u5916\uff0c\u5e73\u65f6\u53ea\u8981\u4fdd\u8bc1\u6709\u4e00\u5757\u786c\u76d8\u7a33\u5b9a\u8fd0\u884c\uff0c\u6570\u636e\u5c31\u4e0d\u4f1a\u51fa\u73b0\u635f\u574f\u7684\u60c5\u51b5\uff0c\u53ef\u9760\u6027\u8f83\u9ad8\u3002<\/p>\n RAID 1\u6280\u672f\u867d\u7136\u5341\u5206\u6ce8\u91cd\u6570\u636e\u7684\u5b89\u5168\u6027\uff0c\u4f46\u662f\u56e0\u4e3a\u662f\u5728\u591a\u5757\u786c\u76d8\u8bbe\u5907\u4e2d\u5199\u5165\u4e86\u76f8\u540c\u7684\u6570\u636e\uff0c\u56e0\u6b64\u786c\u76d8\u8bbe\u5907\u7684\u5229\u7528\u7387\u5f97\u4ee5\u4e0b\u964d\u3002\u4ece\u7406\u8bba\u4e0a\u6765\u8bf4\uff0c\u56fe7-2\u6240\u793a\u7684\u786c\u76d8\u7a7a\u95f4\u7684\u771f\u5b9e\u53ef\u7528\u7387\u53ea\u670950%\uff0c\u75313\u5757\u786c\u76d8\u8bbe\u5907\u7ec4\u6210\u7684RAID 1\u78c1\u76d8\u9635\u5217\u7684\u53ef\u7528\u7387\u53ea\u670933%\u5de6\u53f3\uff1b\u4ee5\u6b64\u7c7b\u63a8\u3002\u800c\u4e14\uff0c\u7531\u4e8e\u9700\u8981\u628a\u6570\u636e\u540c\u65f6\u5199\u5165\u5230\u4e24\u5757\u4ee5\u4e0a\u7684\u786c\u76d8\u8bbe\u5907\uff0c\u8fd9\u65e0\u7591\u4e5f\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u589e\u5927\u4e86\u7cfb\u7edf\u8ba1\u7b97\u529f\u80fd\u7684\u8d1f\u8f7d\u3002<\/p>\n \u90a3\u4e48\uff0c\u6709\u6ca1\u6709\u4e00\u79cdRAID\u65b9\u6848\u65e2\u8003\u8651\u5230\u4e86\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\u548c\u6570\u636e\u5b89\u5168\u6027\uff0c\u8fd8\u517c\u987e\u4e86\u6210\u672c\u95ee\u9898\u5462\uff1f\u5b9e\u9645\u4e0a\uff0c\u5355\u4ece\u6570\u636e\u5b89\u5168\u548c\u6210\u672c\u95ee\u9898\u4e0a\u6765\u8bb2\uff0c\u5c31\u4e0d\u53ef\u80fd\u5728\u4fdd\u6301\u539f\u6709\u786c\u76d8\u8bbe\u5907\u7684\u5229\u7528\u7387\u4e14\u8fd8\u4e0d\u589e\u52a0\u65b0\u8bbe\u5907\u7684\u60c5\u51b5\u4e0b\uff0c\u80fd\u5927\u5e45\u63d0\u5347\u6570\u636e\u7684\u5b89\u5168\u6027\u3002\u5218\u9044\u8001\u5e08\u4e5f\u6ca1\u6709\u5fc5\u8981\u5ffd\u60a0\u5404\u4f4d\u8bfb\u8005\uff0c\u4e0b\u9762\u5c06\u8981\u8bb2\u89e3\u7684RAID 5\u6280\u672f\u867d\u7136\u5728\u7406\u8bba\u4e0a\u517c\u987e\u4e86\u4e09\u8005\uff08\u8bfb\u5199\u901f\u5ea6\u3001\u6570\u636e\u5b89\u5168\u6027\u3001\u6210\u672c\uff09\uff0c\u4f46\u5b9e\u9645\u4e0a\u66f4\u50cf\u662f\u5bf9\u8fd9\u4e09\u8005\u7684\u201c\u76f8\u4e92\u59a5\u534f\u201d\u3002<\/p>\n 3. RAID 5<\/span><\/strong><\/p>\n \u5982\u56fe7-3\u6240\u793a\uff0cRAID5\u6280\u672f\u662f\u628a\u786c\u76d8\u8bbe\u5907\u7684\u6570\u636e\u5947\u5076\u6821\u9a8c\u4fe1\u606f\u4fdd\u5b58\u5230\u5176\u4ed6\u786c\u76d8\u8bbe\u5907\u4e2d\u3002RAID 5\u78c1\u76d8\u9635\u5217\u4e2d\u6570\u636e\u7684\u5947\u5076\u6821\u9a8c\u4fe1\u606f\u5e76\u4e0d\u662f\u5355\u72ec\u4fdd\u5b58\u5230\u67d0\u4e00\u5757\u786c\u76d8\u8bbe\u5907\u4e2d\uff0c\u800c\u662f\u5b58\u50a8\u5230\u9664\u81ea\u8eab\u4ee5\u5916\u7684\u5176\u4ed6\u6bcf\u4e00\u5757\u786c\u76d8\u8bbe\u5907\u4e0a\u3002\u8fd9\u6837\u7684\u597d\u5904\u662f\uff0c\u5176\u4e2d\u4efb\u4f55\u4e00\u8bbe\u5907\u635f\u574f\u540e\u4e0d\u81f3\u4e8e\u51fa\u73b0\u81f4\u547d\u7f3a\u9677\u3002\u56fe7-3\u4e2dParity\u90e8\u5206\u5b58\u653e\u7684\u5c31\u662f\u6570\u636e\u7684\u5947\u5076\u6821\u9a8c\u4fe1\u606f\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5c31\u662fRAID 5\u6280\u672f\u5b9e\u9645\u4e0a\u6ca1\u6709\u5907\u4efd\u786c\u76d8\u4e2d\u7684\u771f\u5b9e\u6570\u636e\u4fe1\u606f\uff0c\u800c\u662f\u5f53\u786c\u76d8\u8bbe\u5907\u51fa\u73b0\u95ee\u9898\u540e\u901a\u8fc7\u5947\u5076\u6821\u9a8c\u4fe1\u606f\u6765\u5c1d\u8bd5\u91cd\u5efa\u635f\u574f\u7684\u6570\u636e\u3002RAID\u8fd9\u6837\u7684\u6280\u672f\u7279\u6027\u201c\u59a5\u534f\u201d\u5730\u517c\u987e\u4e86\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\u3001\u6570\u636e\u5b89\u5168\u6027\u4e0e\u5b58\u50a8\u6210\u672c\u95ee\u9898\u3002<\/p>\n <\/p>\n \u56fe7-3\u00a0 RAID5\u6280\u672f\u793a\u610f\u56fe<\/p>\n RAID 5\u6700\u5c11\u75313\u5757\u786c\u76d8\u7ec4\u6210\uff0c\u4f7f\u7528\u7684\u662f\u786c\u76d8\u5207\u5272\uff08Disk Striping\uff09\u6280\u672f\u3002\u76f8\u8f83\u4e8eRAID 1\u7ea7\u522b\uff0c\u597d\u5904\u5c31\u5728\u4e8e\u4fdd\u5b58\u7684\u662f\u5947\u5076\u6821\u9a8c\u4fe1\u606f\u800c\u4e0d\u662f\u4e00\u6a21\u4e00\u6837\u7684\u6587\u4ef6\u5185\u5bb9\uff0c\u6240\u4ee5\u5f53\u91cd\u590d\u5199\u5165\u67d0\u4e2a\u6587\u4ef6\u65f6\uff0cRAID 5\u7ea7\u522b\u7684\u78c1\u76d8\u9635\u5217\u7ec4\u53ea\u9700\u8981\u5bf9\u5e94\u4e00\u4e2a\u5947\u5076\u6821\u9a8c\u4fe1\u606f\u5c31\u53ef\u4ee5\uff0c\u6548\u7387\u66f4\u9ad8\uff0c\u5b58\u50a8\u6210\u672c\u4e5f\u4f1a\u968f\u4e4b\u964d\u4f4e\u3002<\/p>\n 4. \u00a0RAID 10<\/strong><\/span><\/p>\n RAID 5\u6280\u672f\u662f\u51fa\u4e8e\u786c\u76d8\u8bbe\u5907\u7684\u6210\u672c\u95ee\u9898\u5bf9\u8bfb\u5199\u901f\u5ea6\u548c\u6570\u636e\u7684\u5b89\u5168\u6027\u80fd\u6709\u4e86\u4e00\u5b9a\u7684\u59a5\u534f\uff0c\u4f46\u662f\u5927\u90e8\u5206\u4f01\u4e1a\u66f4\u5728\u4e4e\u7684\u662f\u6570\u636e\u672c\u8eab\u7684\u4ef7\u503c\u800c\u975e\u786c\u76d8\u4ef7\u683c\uff0c\u56e0\u6b64\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u4e3b\u8981\u4f7f\u7528RAID 10\u6280\u672f\u3002<\/p>\n \u987e\u540d\u601d\u4e49\uff0cRAID 10\u6280\u672f\u662fRAID 1+RAID 0\u6280\u672f\u7684\u4e00\u4e2a\u201c\u7ec4\u5408\u4f53\u201d\u3002\u5982\u56fe7-4\u6240\u793a\uff0cRAID 10\u6280\u672f\u9700\u8981\u81f3\u5c114\u5757\u786c\u76d8\u6765\u7ec4\u5efa\uff0c\u5176\u4e2d\u5148\u5206\u522b\u4e24\u4e24\u5236\u4f5c\u6210RAID 1\u78c1\u76d8\u9635\u5217\uff0c\u4ee5\u4fdd\u8bc1\u6570\u636e\u7684\u5b89\u5168\u6027\uff1b\u7136\u540e\u518d\u5bf9\u4e24\u4e2aRAID 1\u78c1\u76d8\u9635\u5217\u5b9e\u65bdRAID 0\u6280\u672f\uff0c\u8fdb\u4e00\u6b65\u63d0\u9ad8\u786c\u76d8\u8bbe\u5907\u7684\u8bfb\u5199\u901f\u5ea6\u3002\u8fd9\u6837\u4ece\u7406\u8bba\u4e0a\u6765\u8bb2\uff0c\u53ea\u8981\u574f\u7684\u4e0d\u662f\u540c\u4e00\u9635\u5217\u4e2d\u7684\u6240\u6709\u786c\u76d8\uff0c\u90a3\u4e48\u6700\u591a\u53ef\u4ee5\u635f\u574f50%\u7684\u786c\u76d8\u8bbe\u5907\u800c\u4e0d\u4e22\u5931\u6570\u636e\u3002\u7531\u4e8eRAID 10\u6280\u672f\u7ee7\u627f\u4e86RAID 0\u7684\u9ad8\u8bfb\u5199\u901f\u5ea6\u548cRAID 1\u7684\u6570\u636e\u5b89\u5168\u6027\uff0c\u5728\u4e0d\u8003\u8651\u6210\u672c\u7684\u60c5\u51b5\u4e0bRAID 10\u7684\u6027\u80fd\u4e5f\u8d85\u8fc7\u4e86RAID 5\uff0c\u56e0\u6b64\u5f53\u524d\u6210\u4e3a\u5e7f\u6cdb\u4f7f\u7528\u7684\u4e00\u79cd\u5b58\u50a8\u6280\u672f\u3002<\/p>\n <\/p>\n \u56fe7-4\u00a0 RAID 10\u6280\u672f\u793a\u610f\u56fe<\/p>\n \u7531\u4e8eRAID 10\u662f\u7531RAID 1\u548cRAID 0\u7ec4\u6210\u7684\uff0c\u56e0\u6b64\u6b63\u786e\u7684\u53eb\u6cd5\u662f\u201cRAID\u4e00\u96f6\u201d\uff0c\u800c\u4e0d\u662f\u201cRAID\u5341\u201d\u3002<\/p>\n<\/div>\n<\/div>\n \u4ed4\u7ec6\u67e5\u770b\u56fe7-4\u53ef\u4ee5\u53d1\u73b0\uff0cRAID 10\u662f\u5148\u5bf9\u4fe1\u606f\u8fdb\u884c\u5206\u5272\uff0c\u7136\u540e\u518d\u4e24\u4e24\u4e00\u7ec4\u5236\u4f5c\u955c\u50cf\u3002\u4e5f\u5c31\u662f\u5148\u5c06RAID 1\u4f5c\u4e3a\u6700\u4f4e\u7ea7\u522b\u7684\u7ec4\u5408\uff0c\u7136\u540e\u518d\u4f7f\u7528RAID 0\u6280\u672f\u5c06RAID 1\u78c1\u76d8\u9635\u5217\u7ec4\u5408\u5230\u4e00\u8d77\uff0c\u5c06\u5b83\u4eec\u89c6\u4e3a\u201c\u4e00\u6574\u5757\u201d\u786c\u76d8\u3002\u800cRAID 01\u5219\u76f8\u53cd\uff0c\u5b83\u662f\u5148\u5c06\u786c\u76d8\u5206\u4e3a\u4e24\u7ec4\uff0c\u7136\u540e\u4f7f\u7528RAID 0\u4f5c\u4e3a\u6700\u4f4e\u7ea7\u522b\u7684\u7ec4\u5408\uff0c\u518d\u5c06\u8fd9\u4e24\u7ec4RAID 0\u786c\u76d8\u901a\u8fc7RAID 1\u6280\u672f\u7ec4\u5408\u5230\u4e00\u8d77\u3002<\/p>\n RAID 10\u6280\u672f\u548cRAID 01\u6280\u672f\u7684\u533a\u522b\u975e\u5e38\u660e\u663e\u3002\u5728RAID 10\u4e2d\uff0c\u4efb\u4f55\u4e00\u5757\u786c\u76d8\u635f\u574f\u90fd\u4e0d\u4f1a\u5f71\u54cd\u5230\u6570\u636e\u5b89\u5168\u6027\uff0c\u5176\u4f59\u786c\u76d8\u5747\u4f1a\u6b63\u5e38\u8fd0\u4f5c\u3002\u4f46\u5728RAID 01\u4e2d\uff0c\u53ea\u8981\u6709\u4efb\u4f55\u4e00\u5757\u786c\u76d8\u635f\u574f\uff0c\u6700\u4f4e\u7ea7\u522b\u7684RAID 0\u78c1\u76d8\u9635\u5217\u9a6c\u4e0a\u4f1a\u505c\u6b62\u8fd0\u4f5c\uff0c\u8fd9\u53ef\u80fd\u9020\u6210\u4e25\u91cd\u9690\u60a3\u3002\u6240\u4ee5RAID 10\u8fdc\u6bd4RAID 01\u5e38\u89c1\uff0c\u5f88\u591a\u4e3b\u677f\u751a\u81f3\u4e0d\u652f\u6301RAID 01\u3002<\/p>\n \u5728\u5177\u5907\u4e86\u7b2c6\u7ae0\u7684\u786c\u76d8\u8bbe\u5907\u7ba1\u7406\u57fa\u7840\u4e4b\u540e\uff0c\u518d\u6765\u90e8\u7f72RAID\u548cLVM\u5c31\u53d8\u5f97\u5341\u5206\u8f7b\u677e\u4e86\u3002\u9996\u5148\uff0c\u9700\u8981\u5728\u865a\u62df\u673a\u4e2d\u6dfb\u52a04\u5757\u786c\u76d8\u8bbe\u5907\u6765\u5236\u4f5c\u4e00\u4e2aRAID 10\u78c1\u76d8\u9635\u5217\uff0c\u5982\u56fe7-5\u6240\u793a\u3002\u8fd9\u91cc\u4e0d\u518d\u8be6\u8ff0\u6dfb\u52a0\u786c\u76d8\u7684\u6b65\u9aa4\uff0c\u5927\u5bb6\u81ea\u5df1\u64cd\u4f5c\u5c31\u884c\u3002\u8bb0\u5f97\u786c\u76d8\u8981\u7528SCSI\u6216SATA\u63a5\u53e3\u7684\u7c7b\u578b\uff0c\u5927\u5c0f\u9ed8\u8ba420GB\u5c31\u53ef\u4ee5\u3002<\/p>\n \u8fd9\u51e0\u5757\u786c\u76d8\u8bbe\u5907\u662f\u6a21\u62df\u51fa\u6765\u7684\uff0c\u4e0d\u9700\u8981\u7279\u610f\u53bb\u4e70\u51e0\u5757\u771f\u5b9e\u7684\u7269\u7406\u786c\u76d8\u63d2\u5230\u7535\u8111\u4e0a\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u4e00\u5b9a\u8981\u8bb0\u5f97\u5728\u5173\u95ed\u7cfb\u7edf\u4e4b\u540e\uff0c\u518d\u5728\u865a\u62df\u673a\u4e2d\u6dfb\u52a0\u786c\u76d8\u8bbe\u5907\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u56e0\u4e3a\u8ba1\u7b97\u673a\u67b6\u6784\u7684\u4e0d\u540c\u800c\u5bfc\u81f4\u865a\u62df\u673a\u7cfb\u7edf\u65e0\u6cd5\u8bc6\u522b\u65b0\u6dfb\u52a0\u7684\u786c\u76d8\u8bbe\u5907\u3002<\/p>\n \u5f53\u524d\uff0c\u751f\u4ea7\u73af\u5883\u4e2d\u7528\u5230\u7684\u670d\u52a1\u5668\u4e00\u822c\u90fd\u914d\u5907RAID\u9635\u5217\u5361\uff0c\u5c3d\u7ba1\u670d\u52a1\u5668\u7684\u4ef7\u683c\u8d8a\u6765\u8d8a\u4fbf\u5b9c\uff0c\u4f46\u662f\u6211\u4eec\u6ca1\u6709\u5fc5\u8981\u4e3a\u4e86\u505a\u4e00\u4e2a\u5b9e\u9a8c\u800c\u53bb\u5355\u72ec\u8d2d\u4e70\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u800c\u662f\u53ef\u4ee5\u5b66\u4f1a\u4f7f\u7528mdadm\u547d\u4ee4\u5728Linux\u7cfb\u7edf\u4e2d\u521b\u5efa\u548c\u7ba1\u7406\u8f6f\u4ef6RAID\u78c1\u76d8\u9635\u5217\uff0c\u800c\u4e14\u5b83\u6d89\u53ca\u7684\u7406\u8bba\u77e5\u8bc6\u548c\u64cd\u4f5c\u8fc7\u7a0b\u4e0e\u751f\u4ea7\u73af\u5883\u4e2d\u7684\u5b8c\u5168\u4e00\u81f4\u3002<\/p>\n mdadm\u547d\u4ee4\u7528\u4e8e\u521b\u5efa\u3001\u8c03\u6574\u3001\u76d1\u63a7\u548c\u7ba1\u7406RAID\u8bbe\u5907\uff0c\u82f1\u6587\u5168\u79f0\u4e3a\u201cmultiple devices admin\u201d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cmdadm\u53c2\u6570 \u786c\u76d8\u540d\u79f0\u201d\u3002<\/p>\n <\/p>\n \u56fe7-5\u00a0 \u6dfb\u52a0\u56db\u5757\u786c\u76d8\u8bbe\u5907<\/p>\n mdadm\u547d\u4ee4\u4e2d\u7684\u5e38\u7528\u53c2\u6570\u53ca\u4f5c\u7528\u5982\u88687-2\u6240\u793a\u3002<\/p>\n \u88687-2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 mdadm\u547d\u4ee4\u7684\u5e38\u7528\u53c2\u6570\u548c\u4f5c\u7528<\/p>\n <\/div>\n \u63a5\u4e0b\u6765\uff0c\u4f7f\u7528mdadm\u547d\u4ee4\u521b\u5efaRAID 10\uff0c\u540d\u79f0\u4e3a\u201c\/dev\/md0\u201d\u3002<\/p>\n \u7b2c6\u7ae0\u4e2d\u8bb2\u5230\uff0cudev\u662fLinux\u7cfb\u7edf\u5185\u6838\u4e2d\u7528\u6765\u7ed9\u786c\u4ef6\u547d\u540d\u7684\u670d\u52a1\uff0c\u5176\u547d\u540d\u89c4\u5219\u4e5f\u975e\u5e38\u7b80\u5355\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u547d\u540d\u89c4\u5219\u731c\u6d4b\u5230\u7b2c\u4e8c\u4e2aSCSI\u5b58\u50a8\u8bbe\u5907\u7684\u540d\u79f0\u4f1a\u662f\/dev\/sdb\uff0c\u7136\u540e\u4f9d\u6b64\u7c7b\u63a8\u3002\u4f7f\u7528\u786c\u76d8\u8bbe\u5907\u6765\u90e8\u7f72RAID\u78c1\u76d8\u9635\u5217\u5f88\u50cf\u662f\u5c06\u51e0\u4f4d\u540c\u5b66\u7ec4\u6210\u4e00\u4e2a\u73ed\u7ea7\uff0c\u4f46\u603b\u4e0d\u80fd\u5c06\u73ed\u7ea7\u547d\u540d\u4e3a\/dev\/sdbcde\u5427\u3002\u5c3d\u7ba1\u8fd9\u6837\u53ef\u4ee5\u4e00\u773c\u770b\u51fa\u5b83\u662f\u7531\u54ea\u4e9b\u5143\u7d20\u7ec4\u6210\u7684\uff0c\u4f46\u662f\u5e76\u4e0d\u5229\u4e8e\u8bb0\u5fc6\u548c\u9605\u8bfb\u3002\u66f4\u4f55\u51b5\u5982\u679c\u4f7f\u752810\u300150\u3001100\u4e2a\u786c\u76d8\u6765\u90e8\u7f72RAID\u78c1\u76d8\u9635\u5217\u5462\uff1f<\/p>\n \u6b64\u65f6\uff0c\u5c31\u9700\u8981\u4f7f\u7528mdadm\u4e2d\u7684\u53c2\u6570\u4e86\u3002\u5176\u4e2d\uff0c-C\u53c2\u6570\u4ee3\u8868\u521b\u5efa\u4e00\u4e2aRAID\u9635\u5217\u5361\uff1b-v\u53c2\u6570\u663e\u793a\u521b\u5efa\u7684\u8fc7\u7a0b\uff0c\u540c\u65f6\u5728\u540e\u9762\u8ffd\u52a0\u4e00\u4e2a\u8bbe\u5907\u540d\u79f0\/dev\/md0\uff0c\u8fd9\u6837\/dev\/md0\u5c31\u662f\u521b\u5efa\u540e\u7684RAID\u78c1\u76d8\u9635\u5217\u7684\u540d\u79f0\uff1b-n 4\u53c2\u6570\u4ee3\u8868\u4f7f\u75284\u5757\u786c\u76d8\u6765\u90e8\u7f72\u8fd9\u4e2aRAID\u78c1\u76d8\u9635\u5217\uff1b\u800c-l 10\u53c2\u6570\u5219\u4ee3\u8868RAID 10\u65b9\u6848\uff1b\u6700\u540e\u518d\u52a0\u4e0a4\u5757\u786c\u76d8\u8bbe\u5907\u7684\u540d\u79f0\u5c31\u641e\u5b9a\u4e86\u3002<\/p>\n \u521d\u59cb\u5316\u8fc7\u7a0b\u5927\u7ea6\u9700\u89811\u5206\u949f\u5de6\u53f3\uff0c\u671f\u95f4\u53ef\u4ee5\u7528-D\u53c2\u6570\u8fdb\u884c\u67e5\u770b\u3002\u4e5f\u53ef\u4ee5\u7528-Q\u53c2\u6570\u67e5\u770b\u7b80\u8981\u4fe1\u606f\uff1a<\/p>\n \u540c\u5b66\u4eec\u53ef\u80fd\u4f1a\u597d\u5947\uff0c\u4e3a\u4ec0\u4e484\u575720GB\u5927\u5c0f\u7684\u786c\u76d8\u7ec4\u6210\u7684\u78c1\u76d8\u9635\u5217\u7ec4\uff0c\u53ef\u7528\u7a7a\u95f4\u53ea\u670939.97GB\u5462\uff1f<\/p>\n \u8fd9\u91cc\u4e0d\u5f97\u4e0d\u63d0\u5230RAID 10\u6280\u672f\u7684\u539f\u7406\u3002\u5b83\u901a\u8fc7\u4e24\u4e24\u4e00\u7ec4\u786c\u76d8\u7ec4\u6210\u7684RAID 1\u78c1\u76d8\u9635\u5217\u4fdd\u8bc1\u4e86\u6570\u636e\u7684\u53ef\u9760\u6027\uff0c\u5176\u4e2d\u6bcf\u4e00\u4efd\u6570\u636e\u90fd\u4f1a\u88ab\u4fdd\u5b58\u4e24\u6b21\uff0c\u56e0\u6b64\u5bfc\u81f4\u786c\u76d8\u5b58\u572850%\u7684\u4f7f\u7528\u7387\u548c50%\u7684\u5197\u4f59\u7387\u3002\u8fd9\u6837\u4e00\u6765\uff0c80GB\u7684\u786c\u76d8\u5bb9\u91cf\u4e5f\u5c31\u53ea\u6709\u4e00\u534a\u4e86\u3002<\/p>\n \u7b49\u4e24\u4e09\u5206\u949f\u540e\uff0c\u628a\u5236\u4f5c\u597d\u7684RAID\u78c1\u76d8\u9635\u5217\u683c\u5f0f\u5316\u4e3aExt4\u683c\u5f0f\uff1a<\/p>\n \u968f\u540e\uff0c\u521b\u5efa\u6302\u8f7d\u70b9\uff0c\u5c06\u786c\u76d8\u8bbe\u5907\u8fdb\u884c\u6302\u8f7d\u64cd\u4f5c\uff1a<\/p>\n \u518d\u6765\u67e5\u770b\/dev\/md0\u78c1\u76d8\u9635\u5217\u8bbe\u5907\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u786e\u8ba4RAID\u7ea7\u522b\uff08Raid Level\uff09\u3001\u9635\u5217\u5927\u5c0f\uff08Array Size\uff09\u548c\u603b\u786c\u76d8\u6570\uff08Total Devices\uff09\u90fd\u662f\u5426\u6b63\u786e\uff1a<\/p>\n \u5982\u679c\u60f3\u8ba9\u521b\u5efa\u597d\u7684RAID\u78c1\u76d8\u9635\u5217\u80fd\u591f\u4e00\u76f4\u63d0\u4f9b\u670d\u52a1\uff0c\u4e0d\u4f1a\u56e0\u6bcf\u6b21\u7684\u91cd\u542f\u64cd\u4f5c\u800c\u53d6\u6d88\uff0c\u90a3\u4e48\u4e00\u5b9a\u8981\u8bb0\u5f97\u5c06\u4fe1\u606f\u6dfb\u52a0\u5230\/etc\/fstab\u6587\u4ef6\u4e2d\uff0c\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u5728\u6bcf\u6b21\u91cd\u542f\u540eRAID\u78c1\u76d8\u9635\u5217\u90fd\u662f\u6709\u6548\u7684\u3002<\/p>\n \u4e4b\u6240\u4ee5\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u90e8\u7f72RAID 10\u78c1\u76d8\u9635\u5217\uff0c\u5c31\u662f\u4e3a\u4e86\u63d0\u9ad8\u5b58\u50a8\u8bbe\u5907\u7684IO\u8bfb\u5199\u901f\u5ea6\u53ca\u6570\u636e\u7684\u5b89\u5168\u6027\uff0c\u4f46\u56e0\u4e3a\u6211\u4eec\u7684\u786c\u76d8\u8bbe\u5907\u662f\u5728\u865a\u62df\u673a\u4e2d\u6a21\u62df\u51fa\u6765\u7684\uff0c\u6240\u4ee5\u5bf9\u4e8e\u8bfb\u5199\u901f\u5ea6\u7684\u6539\u5584\u53ef\u80fd\u5e76\u4e0d\u76f4\u89c2\u3002\u4e0b\u9762\u51b3\u5b9a\u7ed9\u540c\u5b66\u4eec\u8bb2\u89e3\u4e00\u4e0bRAID\u78c1\u76d8\u9635\u5217\u635f\u574f\u540e\u7684\u5904\u7406\u65b9\u6cd5\uff0c\u4ee5\u786e\u4fdd\u5927\u5bb6\u4ee5\u540e\u5728\u6b65\u5165\u8fd0\u7ef4\u5c97\u4f4d\u540e\u4e0d\u4f1a\u56e0\u4e3a\u7a81\u53d1\u4e8b\u4ef6\u800c\u624b\u5fd9\u811a\u4e71\u3002<\/p>\n \u5728\u786e\u8ba4\u6709\u4e00\u5757\u7269\u7406\u786c\u76d8\u8bbe\u5907\u51fa\u73b0\u635f\u574f\u800c\u4e0d\u80fd\u518d\u7ee7\u7eed\u6b63\u5e38\u4f7f\u7528\u540e\uff0c\u5e94\u8be5\u4f7f\u7528mdadm\u547d\u4ee4\u5c06\u5176\u79fb\u9664\uff0c\u7136\u540e\u67e5\u770bRAID\u78c1\u76d8\u9635\u5217\u7684\u72b6\u6001\uff0c\u53ef\u4ee5\u53d1\u73b0\u72b6\u6001\u5df2\u7ecf\u6539\u53d8\uff1a<\/p>\n \u521a\u521a\u4f7f\u7528\u7684-f\u53c2\u6570\u662f\u8ba9\u786c\u76d8\u6a21\u62df\u635f\u574f\u7684\u6548\u679c\u3002\u4e3a\u4e86\u80fd\u591f\u5f7b\u5e95\u5730\u5c06\u6545\u969c\u76d8\u79fb\u9664\uff0c\u8fd8\u8981\u518d\u6267\u884c\u4e00\u6b65\u64cd\u4f5c\uff1a<\/p>\n \u5728RAID 10\u7ea7\u522b\u7684\u78c1\u76d8\u9635\u5217\u4e2d\uff0c\u5f53RAID 1\u78c1\u76d8\u9635\u5217\u4e2d\u5b58\u5728\u4e00\u4e2a\u6545\u969c\u76d8\u65f6\u5e76\u4e0d\u5f71\u54cdRAID 10\u78c1\u76d8\u9635\u5217\u7684\u4f7f\u7528\u3002\u5f53\u8d2d\u4e70\u4e86\u65b0\u7684\u786c\u76d8\u8bbe\u5907\u540e\u518d\u4f7f\u7528mdadm\u547d\u4ee4\u4e88\u4ee5\u66ff\u6362\u5373\u53ef\uff0c\u5728\u6b64\u671f\u95f4\u53ef\u4ee5\u5728\/RAID\u76ee\u5f55\u4e2d\u6b63\u5e38\u5730\u521b\u5efa\u6216\u5220\u9664\u6587\u4ef6\u3002\u7531\u4e8e\u6211\u4eec\u662f\u5728\u865a\u62df\u673a\u4e2d\u6a21\u62df\u786c\u76d8\uff0c\u6240\u4ee5\u5148\u91cd\u542f\u7cfb\u7edf\uff0c\u7136\u540e\u518d\u628a\u65b0\u7684\u786c\u76d8\u6dfb\u52a0\u5230RAID\u78c1\u76d8\u9635\u5217\u4e2d\u3002<\/p>\n \u66f4\u6362\u786c\u76d8\u540e\u518d\u6b21\u4f7f\u7528-a\u53c2\u6570\u8fdb\u884c\u6dfb\u52a0\u64cd\u4f5c\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u4f1a\u81ea\u52a8\u5f00\u59cb\u6570\u636e\u7684\u540c\u6b65\u5de5\u4f5c\u3002\u4f7f\u7528-D\u53c2\u6570\u5373\u53ef\u770b\u5230\u6574\u4e2a\u8fc7\u7a0b\u548c\u8fdb\u5ea6\uff08\u7528\u767e\u5206\u6bd4\u8868\u793a\uff09\uff1a<\/p>\n \u8fd9\u65f6\u5019\u53ef\u80fd\u4f1a\u6709\u5b66\u751f\u4e3e\u624b\u63d0\u95ee\u4e86\uff1a\u201c\u8001\u5e08\uff0c\u6211\u4eec\u516c\u53f8\u673a\u623f\u7684\u9635\u5217\u5361\u4e0a\u670930\u591a\u5757\u786c\u76d8\u5462\uff0c\u5c31\u7b97\u77e5\u9053\/dev\/sdb\u786c\u76d8\u53d1\u751f\u4e86\u6545\u969c\uff0c\u6211\u4e5f\u4e0d\u77e5\u9053\u8be5\u66ff\u6362\u54ea\u4e00\u5757\u554a\uff0c\u8981\u662f\u9519\u62d4\u4e86\u597d\u8bbe\u5907\u90a3\u5c31\u9ebb\u70e6\u4e86\u3002\u201d\u5176\u5b9e\u4e0d\u7528\u62c5\u5fc3\uff0c\u56e0\u4e3a\u4e00\u65e6\u786c\u76d8\u53d1\u751f\u6545\u969c\uff0c\u670d\u52a1\u5668\u4e0a\u76f8\u5e94\u7684\u6307\u793a\u706f\u4e5f\u4f1a\u53d8\u6210\u7ea2\u706f\uff08\u6216\u8005\u53d8\u6210\u4e00\u76f4\u95ea\u70c1\u7684\u9ec4\u706f\uff09\uff0c\u5982\u56fe7-6\u6240\u793a\u3002<\/p>\n <\/p>\n RAID 10\u78c1\u76d8\u9635\u5217\u4e2d\u6700\u591a\u5141\u8bb850%\u7684\u786c\u76d8\u8bbe\u5907\u53d1\u751f\u6545\u969c\uff0c\u4f46\u662f\u5b58\u5728\u8fd9\u6837\u4e00\u79cd\u6781\u7aef\u60c5\u51b5\uff0c\u5373\u540c\u4e00RAID 1\u78c1\u76d8\u9635\u5217\u4e2d\u7684\u786c\u76d8\u8bbe\u5907\u82e5\u5168\u90e8\u635f\u574f\uff0c\u4e5f\u4f1a\u5bfc\u81f4\u6570\u636e\u4e22\u5931\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5728RAID 10\u78c1\u76d8\u9635\u5217\u4e2d\uff0c\u5982\u679cRAID 1\u4e2d\u7684\u67d0\u4e00\u5757\u786c\u76d8\u51fa\u73b0\u4e86\u6545\u969c\uff0c\u800c\u6211\u4eec\u6b63\u5728\u524d\u5f80\u4fee\u590d\u7684\u8def\u4e0a\uff0c\u6070\u5de7\u8be5RAID 1\u78c1\u76d8\u9635\u5217\u4e2d\u7684\u53e6\u4e00\u5757\u786c\u76d8\u8bbe\u5907\u4e5f\u51fa\u73b0\u6545\u969c\uff0c\u90a3\u4e48\u6570\u636e\u5c31\u88ab\u5f7b\u5e95\u4e22\u5931\u4e86\u3002\u5218\u9044\u8001\u5e08\u53ef\u771f\u4e0d\u662f\u4e4c\u9e26\u5634\uff0c\u8fd9\u79cdRAID 1\u78c1\u76d8\u9635\u5217\u4e2d\u7684\u786c\u76d8\u8bbe\u5907\u540c\u65f6\u635f\u574f\u7684\u60c5\u51b5\u8fd8\u771f\u88ab\u6211\u7684\u5b66\u751f\u9047\u5230\u8fc7\u3002<\/p>\n \u5728\u8fd9\u6837\u7684\u60c5\u51b5\u4e0b\uff0c\u8be5\u600e\u4e48\u529e\u5462\uff1f\u5176\u5b9e\uff0c\u5b8c\u5168\u53ef\u4ee5\u4f7f\u7528RAID\u5907\u4efd\u76d8\u6280\u672f\u6765\u9884\u9632\u8fd9\u7c7b\u4e8b\u6545\u3002\u8be5\u6280\u672f\u7684\u6838\u5fc3\u7406\u5ff5\u5c31\u662f\u51c6\u5907\u4e00\u5757\u8db3\u591f\u5927\u7684\u786c\u76d8\uff0c\u8fd9\u5757\u786c\u76d8\u5e73\u65f6\u5904\u4e8e\u95f2\u7f6e\u72b6\u6001\uff0c\u4e00\u65e6RAID\u78c1\u76d8\u9635\u5217\u4e2d\u6709\u786c\u76d8\u51fa\u73b0\u6545\u969c\u540e\u5219\u4f1a\u9a6c\u4e0a\u81ea\u52a8\u9876\u66ff\u4e0a\u53bb\u3002\u8fd9\u6837\u5f88\u68d2\u5427\uff01<\/p>\n \u4e3a\u4e86\u907f\u514d\u591a\u4e2a\u5b9e\u9a8c\u4e4b\u95f4\u76f8\u4e92\u53d1\u751f\u51b2\u7a81\uff0c\u6211\u4eec\u9700\u8981\u4fdd\u8bc1\u6bcf\u4e2a\u5b9e\u9a8c\u7684\u76f8\u5bf9\u72ec\u7acb\u6027\uff0c\u4e3a\u6b64\u9700\u8981\u5927\u5bb6\u81ea\u884c\u5c06\u865a\u62df\u673a\u8fd8\u539f\u5230\u521d\u59cb\u72b6\u6001\u3002\u53e6\u5916\uff0c\u7531\u4e8e\u521a\u624d\u5df2\u7ecf\u6f14\u793a\u4e86RAID 10\u78c1\u76d8\u9635\u5217\u7684\u90e8\u7f72\u65b9\u6cd5\uff0c\u73b0\u5728\u6765\u770b\u4e00\u4e0bRAID 5\u7684\u90e8\u7f72\u6548\u679c\u3002\u90e8\u7f72RAID 5\u78c1\u76d8\u9635\u5217\u65f6\uff0c\u81f3\u5c11\u9700\u8981\u7528\u52303\u5757\u786c\u76d8\uff0c\u8fd8\u9700\u8981\u518d\u52a0\u4e00\u5757\u5907\u4efd\u786c\u76d8\uff08\u4e5f\u53eb\u70ed\u5907\u76d8\uff09\uff0c\u6240\u4ee5\u603b\u8ba1\u9700\u8981\u5728\u865a\u62df\u673a\u4e2d\u6a21\u62df4\u5757\u786c\u76d8\u8bbe\u5907\uff0c\u5982\u56fe7-7\u6240\u793a\u3002<\/p>\n \u56fe7-7 \u91cd\u7f6e\u865a\u62df\u673a\u540e\uff0c\u518d\u6dfb\u52a0\u56db\u5757\u786c\u76d8\u8bbe\u5907<\/p>\n \u73b0\u5728\u521b\u5efa\u4e00\u4e2aRAID 5\u78c1\u76d8\u9635\u5217+\u5907\u4efd\u76d8\u3002\u5728\u4e0b\u9762\u7684\u547d\u4ee4\u4e2d\uff0c\u53c2\u6570-n 3\u4ee3\u8868\u521b\u5efa\u8fd9\u4e2aRAID 5\u78c1\u76d8\u9635\u5217\u6240\u9700\u7684\u786c\u76d8\u6570\uff0c\u53c2\u6570-l 5\u4ee3\u8868RAID\u7684\u7ea7\u522b\uff0c\u800c\u53c2\u6570-x 1\u5219\u4ee3\u8868\u6709\u4e00\u5757\u5907\u4efd\u76d8\u3002\u5f53\u67e5\u770b\/dev\/md0\uff08\u5373RAID 5\u78c1\u76d8\u9635\u5217\u7684\u540d\u79f0\uff09\u78c1\u76d8\u9635\u5217\u7684\u65f6\u5019\uff0c\u5c31\u80fd\u770b\u5230\u6709\u4e00\u5757\u5907\u4efd\u76d8\u5728\u7b49\u5f85\u4e2d\u4e86\u3002<\/p>\n \u73b0\u5728\u5c06\u90e8\u7f72\u597d\u7684RAID 5\u78c1\u76d8\u9635\u5217\u683c\u5f0f\u5316\u4e3aExt4\u6587\u4ef6\u683c\u5f0f\uff0c\u7136\u540e\u6302\u8f7d\u5230\u76ee\u5f55\u4e0a\uff0c\u4e4b\u540e\u5c31\u80fd\u591f\u4f7f\u7528\u4e86\uff1a<\/p>\n \u75313\u5757\u786c\u76d8\u7ec4\u6210\u7684RAID 5\u78c1\u76d8\u9635\u5217\uff0c\u5176\u5bf9\u5e94\u7684\u53ef\u7528\u7a7a\u95f4\u662fn<\/em>-1\uff0c\u4e5f\u5c31\u662f40GB\u3002\u70ed\u5907\u76d8\u7684\u7a7a\u95f4\u4e0d\u8ba1\u7b97\u8fdb\u6765\uff0c\u5e73\u65f6\u5b8c\u5168\u5c31\u662f\u5728\u201c\u7761\u89c9\u201d\uff0c\u53ea\u6709\u5728\u610f\u5916\u51fa\u73b0\u65f6\u624d\u4f1a\u5f00\u59cb\u5de5\u4f5c\u3002<\/p>\n \u6700\u540e\u662f\u89c1\u8bc1\u5947\u8ff9\u7684\u65f6\u523b\uff01\u6211\u4eec\u518d\u6b21\u628a\u786c\u76d8\u8bbe\u5907\/dev\/sdb\u79fb\u51fa\u78c1\u76d8\u9635\u5217\uff0c\u7136\u540e\u8fc5\u901f\u67e5\u770b\/dev\/md0\u78c1\u76d8\u9635\u5217\u7684\u72b6\u6001\uff0c\u5c31\u4f1a\u53d1\u73b0\u5907\u4efd\u76d8\u5df2\u7ecf\u88ab\u81ea\u52a8\u9876\u66ff\u4e0a\u53bb\u5e76\u5f00\u59cb\u4e86\u6570\u636e\u540c\u6b65\u3002RAID\u4e2d\u7684\u8fd9\u79cd\u5907\u4efd\u76d8\u6280\u672f\u975e\u5e38\u5b9e\u7528\uff0c\u53ef\u4ee5\u5728\u4fdd\u8bc1RAID\u78c1\u76d8\u9635\u5217\u6570\u636e\u5b89\u5168\u6027\u7684\u57fa\u7840\u4e0a\u8fdb\u4e00\u6b65\u63d0\u9ad8\u6570\u636e\u53ef\u9760\u6027\u3002\u6240\u4ee5\uff0c\u5982\u679c\u516c\u53f8\u4e0d\u5dee\u94b1\u7684\u8bdd\uff0c\u8fd8\u662f\u4e70\u4e0a\u4e00\u5757\u5907\u4efd\u76d8\u4ee5\u9632\u4e07\u4e00\u5427\u3002<\/p>\n \u662f\u4e0d\u662f\u611f\u89c9\u5f88\u6709\u610f\u601d\u5462\uff1f\u53e6\u5916\u8003\u8651\u5230\u7bc7\u5e45\u9650\u5236\uff0c\u6211\u4eec\u4e00\u76f4\u6ca1\u6709\u590d\u5236\u3001\u7c98\u8d34\/RAID\u76ee\u5f55\u4e2d\u6587\u4ef6\u7684\u4fe1\u606f\uff0c\u6709\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u81ea\u5df1\u52a8\u624b\u8bd5\u4e00\u4e0b\u3002\u91cc\u9762\u7684\u6587\u4ef6\u5185\u5bb9\u975e\u5e38\u5b89\u5168\uff0c\u4e0d\u4f1a\u51fa\u73b0\u4e22\u5931\u7684\u60c5\u51b5\u3002\u5982\u679c\u540e\u9762\u60f3\u518d\u6dfb\u52a0\u4e00\u5757\u70ed\u5907\u76d8\u8fdb\u6765\uff0c\u4f7f\u7528-a\u53c2\u6570\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n \u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0cRAID\u78c1\u76d8\u9635\u5217\u90e8\u7f72\u540e\u4e00\u822c\u4e0d\u4f1a\u88ab\u8f7b\u6613\u505c\u7528\u3002\u4f46\u4e07\u4e00\u8d76\u4e0a\u4e86\uff0c\u8fd8\u662f\u8981\u77e5\u9053\u600e\u4e48\u5c06\u78c1\u76d8\u9635\u5217\u5220\u9664\u3002\u524d\u9762\u90a3\u79cdRAID 5+\u70ed\u5907\u76d8\u635f\u574f\u7684\u60c5\u51b5\u662f\u6bd4\u8f83\u590d\u6742\u7684\uff0c\u6240\u4ee5\u4ee5\u8fd9\u79cd\u60c5\u5f62\u6765\u8fdb\u884c\u8bb2\u89e3\u662f\u518d\u597d\u4e0d\u8fc7\u4e86\u3002<\/p>\n \u9996\u5148\uff0c\u9700\u8981\u5c06\u6240\u6709\u7684\u78c1\u76d8\u90fd\u8bbe\u7f6e\u6210\u505c\u7528\u72b6\u6001\uff1a<\/p>\n \u7136\u540e\u518d\u9010\u4e00\u79fb\u9664\u51fa\u53bb\uff1a<\/p>\n \u5982\u679c\u7740\u6025\uff0c\u4e5f\u53ef\u4ee5\u7528\u201cmdadm \/dev\/md0 -f \/dev\/sdb -r \/dev\/sdb\u201d\u8fd9\u4e00\u6761\u547d\u4ee4\u641e\u5b9a\u3002\u4f46\u662f\uff0c\u5728\u65e9\u671f\u7248\u672c\u7684\u670d\u52a1\u5668\u4e2d\uff0c\u8fd9\u6761\u547d\u4ee4\u4e2d\u7684-f\u548c-r\u4e0d\u80fd\u4e00\u8d77\u4f7f\u7528\uff0c\u56e0\u6b64\u4fdd\u5b88\u8d77\u89c1\uff0c\u8fd8\u662f\u4e00\u6b65\u6b65\u5730\u64cd\u4f5c\u5427\u3002<\/p>\n \u5c06\u6240\u6709\u7684\u786c\u76d8\u90fd\u79fb\u9664\u540e\uff0c\u518d\u6765\u67e5\u770b\u78c1\u76d8\u9635\u5217\u7ec4\u7684\u72b6\u6001\uff1a<\/p>\n \u5f88\u68d2\uff01\u4e0b\u9762\u7ee7\u7eed\u505c\u7528\u6574\u4e2aRAID\u78c1\u76d8\u9635\u5217\uff0c\u54b1\u4eec\u7684\u5de5\u4f5c\u5c31\u5f7b\u5e95\u5b8c\u6210\u4e86\uff1a<\/p>\n \u5728\u6709\u4e00\u4e9b\u8001\u7248\u672c\u7684\u670d\u52a1\u5668\u4e2d\uff0c\u5728\u4f7f\u7528--stop\u53c2\u6570\u540e\u4f9d\u7136\u4f1a\u4fdd\u7559\u8bbe\u5907\u6587\u4ef6\u3002\u8fd9\u5f88\u660e\u663e\u662f\u6ca1\u6709\u5904\u7406\u5e72\u51c0\uff0c\u8fd9\u65f6\u518d\u6267\u884c\u4e00\u4e0b\u201cmdadm --remove \/dev\/md0\u201d\u547d\u4ee4\u5373\u53ef\u3002\u540c\u5b66\u4eec\u53ef\u4ee5\u8bb0\u4e00\u4e0b\uff0c\u4ee5\u5907\u4e0d\u65f6\u4e4b\u9700\u3002<\/p>\n7.1 RAID\u78c1\u76d8\u5197\u4f59\u9635\u5217<\/strong><\/span><\/h5>\n
\n\n
\n RAID\u7ea7\u522b<\/td>\n \u6700\u5c11\u786c\u76d8<\/td>\n \u53ef\u7528\u5bb9\u91cf<\/td>\n \u8bfb\u5199\u6027\u80fd<\/td>\n \u5b89\u5168\u6027<\/td>\n \u7279\u70b9<\/td>\n<\/tr>\n \n 0<\/td>\n 2<\/td>\n n<\/td>\n n<\/td>\n \u4f4e<\/td>\n \u8ffd\u6c42\u6700\u5927\u5bb9\u91cf\u548c\u901f\u5ea6\uff0c\u4efb\u4f55\u4e00\u5757\u76d8\u635f\u574f\uff0c\u6570\u636e\u5168\u90e8\u5f02\u5e38\u3002<\/td>\n<\/tr>\n \n 1<\/td>\n 2<\/td>\n n\/2<\/td>\n n<\/td>\n \u9ad8<\/td>\n \u8ffd\u6c42\u6700\u5927\u5b89\u5168\u6027\uff0c\u53ea\u8981\u9635\u5217\u7ec4\u4e2d\u6709\u4e00\u5757\u786c\u76d8\u53ef\u7528\uff0c\u6570\u636e\u4e0d\u53d7\u5f71\u54cd\u3002<\/td>\n<\/tr>\n \n 5<\/td>\n 3<\/td>\n n-1<\/td>\n n-1<\/td>\n \u4e2d<\/td>\n \u5728\u63a7\u5236\u6210\u672c\u7684\u524d\u63d0\u4e0b\uff0c\u8ffd\u6c42\u786c\u76d8\u7684\u6700\u5927\u5bb9\u91cf\u3001\u901f\u5ea6\u53ca\u5b89\u5168\u6027\uff0c\u5141\u8bb8\u6709\u4e00\u5757\u786c\u76d8\u5f02\u5e38\uff0c\u6570\u636e\u4e0d\u53d7\u5f71\u54cd\u3002<\/td>\n<\/tr>\n \n 10<\/td>\n 4<\/td>\n n\/2<\/td>\n n\/2<\/td>\n \u9ad8<\/td>\n \u7efc\u5408RAID1\u548cRAID0\u7684\u4f18\u70b9\uff0c\u8ffd\u6c42\u786c\u76d8\u7684\u901f\u5ea6\u548c\u5b89\u5168\u6027\uff0c\u5141\u8bb8\u6709\u4e00\u534a\u786c\u76d8\u5f02\u5e38\uff08\u4e0d\u53ef\u540c\u7ec4\uff09\uff0c\u6570\u636e\u4e0d\u53d7\u5f71\u54cd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n Tips<\/strong><\/h3>\n<\/div>\n
7.1.1 \u90e8\u7f72\u78c1\u76d8\u9635\u5217<\/strong><\/span><\/h6>\n
\n\n
\n \u53c2\u6570<\/td>\n \u4f5c\u7528<\/td>\n<\/tr>\n \n -a<\/td>\n \u81ea\u52a8\u68c0\u6d4b\u8bbe\u5907\u540d\u79f0<\/td>\n<\/tr>\n \n -n<\/td>\n \u6307\u5b9a\u8bbe\u5907\u6570\u91cf<\/td>\n<\/tr>\n \n -l<\/td>\n \u6307\u5b9aRAID\u7ea7\u522b<\/td>\n<\/tr>\n \n -C<\/td>\n \u521b\u5efa\u65b0\u7684RAID\u9635\u5217<\/td>\n<\/tr>\n \n -v<\/td>\n \u663e\u793a\u8be6\u7ec6\u8fc7\u7a0b\u4fe1\u606f<\/td>\n<\/tr>\n \n -f<\/td>\n \u6a21\u62df\u8bbe\u5907\u635f\u574f<\/td>\n<\/tr>\n \n -r<\/td>\n \u79fb\u9664\u8bbe\u5907<\/td>\n<\/tr>\n \n -Q<\/td>\n \u67e5\u770b\u6458\u8981\u4fe1\u606f<\/td>\n<\/tr>\n \n -D<\/td>\n \u67e5\u770b\u8be6\u7ec6\u4fe1\u606f<\/td>\n<\/tr>\n \n -S<\/td>\n \u505c\u6b62RAID\u9635\u5217<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n [root@linuxprobe ~]# mdadm -Cv \/dev\/md0 -n 4 -l 10 \/dev\/sdb \/dev\/sdc \/dev\/sdd \/dev\/sde\r\nmdadm: layout defaults to n2\r\nmdadm: layout defaults to n2\r\nmdadm: chunk size defaults to 512K\r\nmdadm: size set to 20954112K\r\nmdadm: Defaulting to version 1.2 metadata\r\nmdadm: array \/dev\/md0 started.<\/pre>\n
[root@linuxprobe ~]# mdadm -Q \/dev\/md0\r\n\/dev\/md0: 39.97GiB raid10 4 devices, 0 spares. Use mdadm --detail for more detail.<\/pre>\n
[root@linuxprobe ~]# mkfs.ext4 \/dev\/md0\r\nmke2fs 1.44.3 (10-July-2018)\r\nCreating filesystem with 10477056 4k blocks and 2621440 inodes\r\nFilesystem UUID: d1c68318-a919-4211-b4dc-c4437bcfe9da\r\nSuperblock backups stored on blocks: \r\n\t32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, \r\n\t4096000, 7962624\r\n\r\nAllocating group tables: done \r\nWriting inode tables: done \r\nCreating journal (65536 blocks): done\r\nWriting superblocks and filesystem accounting information: done \r\n<\/pre>\n
[root@linuxprobe ~]# mkdir \/RAID\r\n[root@linuxprobe ~]# mount \/dev\/md0 \/RAID\r\n[root@linuxprobe ~]# df -h\r\nFilesystem Size Used Avail Use% Mounted on\r\ndevtmpfs 969M 0 969M 0% \/dev\r\ntmpfs 984M 0 984M 0% \/dev\/shm\r\ntmpfs 984M 9.6M 975M 1% \/run\r\ntmpfs 984M 0 984M 0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root 17G 3.9G 14G 23% \/\r\n\/dev\/sr0 6.7G 6.7G 0 100% \/media\/cdrom\r\n\/dev\/sda1 1014M 152M 863M 15% \/boot\r\ntmpfs 197M 16K 197M 1% \/run\/user\/42\r\ntmpfs 197M 3.5M 194M 2% \/run\/user\/0\r\n\/dev\/md0 40G 49M 38G 1% \/RAID<\/strong><\/pre>\n
[root@linuxprobe ~]# mdadm -D \/dev\/md0\r\n\/dev\/md0:\r\n Version : 1.2\r\n Creation Time : Wed Jan 13 08:24:58 2021\r\n Raid Level : raid10\r\n Array Size : 41908224 (39.97 GiB 42.91 GB)\r\n Used Dev Size : 20954112 (19.98 GiB 21.46 GB)\r\n Raid Devices : 4\r\n Total Devices : 4\r\n Persistence : Superblock is persistent\r\n\r\n Update Time : Thu Jan 14 04:49:57 2021\r\n State : clean \r\n Active Devices : 4\r\n Working Devices : 4\r\n Failed Devices : 0\r\n Spare Devices : 0\r\n\r\n Layout : near=2\r\n Chunk Size : 512K\r\n\r\nConsistency Policy : resync\r\n\r\n Name : localhost.localdomain:0 (local to host lrxjmw.cn)\r\n UUID : 289f501b:3f5f70f9:79189d77:f51ca11a\r\n Events : 17\r\n\r\n Number Major Minor RaidDevice State\r\n 0 8 16 0 active sync set-A \/dev\/sdb\r\n 1 8 32 1 active sync set-B \/dev\/sdc\r\n 2 8 48 2 active sync set-A \/dev\/sdd\r\n 3 8 64 3 active sync set-B \/dev\/sde\r\n<\/pre>\n
[root@linuxprobe ~]# echo \"\/dev\/md0 \/RAID ext4 defaults 0 0\" >> \/etc\/fstab\r\n[root@linuxprobe ~]# cat \/etc\/fstab\r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Tue Jul 21 05:03:40 2020\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\r\n#\r\n# After editing this file, run 'systemctl daemon-reload' to update systemd\r\n# units generated from this file.\r\n#\r\n\/dev\/mapper\/rhel-root \/ xfs defaults 0 0\r\nUUID=2db66eb4-d9c1-4522-8fab-ac074cd3ea0b \/boot xfs defaults 0 0\r\n\/dev\/mapper\/rhel-swap swap swap defaults 0 0\r\n\/dev\/cdrom \/media\/cdrom iso9660 defaults 0 0 \r\n\/dev\/md0 \/RAID ext4 defaults 0 0\r\n<\/strong><\/pre>\n
7.1.2 \u635f\u574f\u78c1\u76d8\u9635\u5217\u53ca\u4fee\u590d<\/strong><\/span><\/h6>\n
[root@linuxprobe ~]# mdadm \/dev\/md0 -f \/dev\/sdb\r\nmdadm: set \/dev\/sdb faulty in \/dev\/md0\r\n[root@linuxprobe ~]# mdadm -D \/dev\/md0\r\n\/dev\/md0:\r\n Version : 1.2\r\n Creation Time : Thu Jan 14 05:12:20 2021\r\n Raid Level : raid10\r\n Array Size : 41908224 (39.97 GiB 42.91 GB)\r\n Used Dev Size : 20954112 (19.98 GiB 21.46 GB)\r\n Raid Devices : 4\r\n Total Devices : 4\r\n Persistence : Superblock is persistent\r\n\r\n Update Time : Thu Jan 14 05:33:06 2021\r\n State : clean, degraded \r\n Active Devices : 3\r\n Working Devices : 3\r\n Failed Devices : 1\r\n Spare Devices : 0\r\n\r\n Layout : near=2\r\n Chunk Size : 512K\r\n\r\nConsistency Policy : resync\r\n\r\n Name : localhost.localdomain:0 (local to host localhost.localdomain)\r\n UUID : 81ee0668:7627c733:0b170c41:cd12f376\r\n Events : 19\r\n\r\n Number Major Minor RaidDevice State\r\n - 0 0 0 removed\r\n 1 8 32 1 active sync set-B \/dev\/sdc\r\n 2 8 48 2 active sync set-A \/dev\/sdd\r\n 3 8 64 3 active sync set-B \/dev\/sde\r\n\r\n 0 8 16 - faulty \/dev\/sdb\r\n<\/strong><\/pre>\n
[root@linuxprobe ~]# mdadm \/dev\/md0 -r \/dev\/sdb\r\nmdadm: hot removed \/dev\/sdb from \/dev\/md0<\/pre>\n
[root@linuxprobe ~]# mdadm \/dev\/md0 -a \/dev\/sdb\r\nmdadm: added \/dev\/sdb\r\n[root@linuxprobe ~]# mdadm -D \/dev\/md0\r\n\/dev\/md0:\r\n Version : 1.2\r\n Creation Time : Thu Jan 14 05:12:20 2021\r\n Raid Level : raid10\r\n Array Size : 41908224 (39.97 GiB 42.91 GB)\r\n Used Dev Size : 20954112 (19.98 GiB 21.46 GB)\r\n Raid Devices : 4\r\n Total Devices : 4\r\n Persistence : Superblock is persistent\r\n\r\n Update Time : Thu Jan 14 05:37:32 2021\r\n State : clean, degraded, recovering \r\n Active Devices : 3\r\n Working Devices : 4\r\n Failed Devices : 0\r\n Spare Devices : 1\r\n\r\n Layout : near=2\r\n Chunk Size : 512K\r\n\r\nConsistency Policy : resync\r\n\r\n Rebuild Status : 77% complete<\/strong>\r\n\r\n Name : localhost.localdomain:0 (local to host localhost.localdomain)\r\n UUID : 81ee0668:7627c733:0b170c41:cd12f376\r\n Events : 34\r\n\r\n Number Major Minor RaidDevice State\r\n 4 8 16 0 spare rebuilding \/dev\/sdb<\/strong>\r\n 1 8 32 1 active sync set-B \/dev\/sdc\r\n 2 8 48 2 active sync set-A \/dev\/sdd\r\n 3 8 64 3 active sync set-B \/dev\/sde\r\n<\/pre>\n
7.1.3 \u78c1\u76d8\u9635\u5217+\u5907\u4efd\u76d8<\/strong><\/span><\/h6>\n
[root@linuxprobe ~]# mdadm -Cv \/dev\/md0 -n 3 -l 5 -x 1 \/dev\/sdb \/dev\/sdc \/dev\/sdd \/dev\/sde\r\nmdadm: layout defaults to left-symmetric\r\nmdadm: layout defaults to left-symmetric\r\nmdadm: chunk size defaults to 512K\r\nmdadm: size set to 20954112K\r\nmdadm: Defaulting to version 1.2 metadata\r\nmdadm: array \/dev\/md0 started.\r\n[root@linuxprobe ~]# mdadm -D \/dev\/md0\r\n\/dev\/md0:\r\n Version : 1.2\r\n Creation Time : Thu Jan 14 06:12:32 2021\r\n Raid Level : raid5\r\n Array Size : 41908224 (39.97 GiB 42.91 GB)\r\n Used Dev Size : 20954112 (19.98 GiB 21.46 GB)\r\n Raid Devices : 3\r\n Total Devices : 4\r\n Persistence : Superblock is persistent\r\n\r\n Update Time : Thu Jan 14 06:14:16 2021\r\n State : clean \r\n Active Devices : 3\r\n Working Devices : 4\r\n Failed Devices : 0\r\n Spare Devices : 1\r\n\r\n Layout : left-symmetric\r\n Chunk Size : 512K\r\n\r\nConsistency Policy : resync\r\n\r\n Name : localhost.localdomain:0 (local to host localhost.localdomain)\r\n UUID : cf0c34b6:3b08edfb:85dfa14f:e2bffc1e\r\n Events : 18\r\n\r\n Number Major Minor RaidDevice State\r\n 0 8 16 0 active sync \/dev\/sdb\r\n 1 8 32 1 active sync \/dev\/sdc\r\n 4 8 48 2 active sync \/dev\/sdd\r\n\r\n 3 8 64 - spare \/dev\/sde\r\n<\/strong><\/pre>\n
[root@linuxprobe ~]# mkfs.ext4 \/dev\/md0\r\nmke2fs 1.44.3 (10-July-2018)\r\nCreating filesystem with 10477056 4k blocks and 2621440 inodes\r\nFilesystem UUID: ff016386-1126-4799-8a5b-d716242276ec\r\nSuperblock backups stored on blocks: \r\n\t32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, \r\n\t4096000, 7962624\r\n\r\nAllocating group tables: done \r\nWriting inode tables: done \r\nCreating journal (65536 blocks): done\r\nWriting superblocks and filesystem accounting information: done \r\n[root@linuxprobe ~]# mkdir \/RAID\r\n[root@linuxprobe ~]# echo \"\/dev\/md0 \/RAID ext4 defaults 0 0\" >> \/etc\/fstab\r\n<\/pre>\n
[root@linuxprobe ~]# mount -a\r\n[root@linuxprobe ~]# df -h\r\nFilesystem Size Used Avail Use% Mounted on\r\ndevtmpfs 969M 0 969M 0% \/dev\r\ntmpfs 984M 0 984M 0% \/dev\/shm\r\ntmpfs 984M 9.6M 974M 1% \/run\r\ntmpfs 984M 0 984M 0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root 17G 3.9G 14G 23% \/\r\n\/dev\/sr0 6.7G 6.7G 0 100% \/media\/cdrom\r\n\/dev\/sda1 1014M 152M 863M 15% \/boot\r\ntmpfs 197M 16K 197M 1% \/run\/user\/42\r\ntmpfs 197M 3.5M 194M 2% \/run\/user\/0\r\n\/dev\/md0 40G 49M 38G 1% \/RAID\r\n<\/strong><\/pre>\n
[root@linuxprobe ~]# mdadm \/dev\/md0 -f \/dev\/sdb\r\nmdadm: set \/dev\/sdb faulty in \/dev\/md0\r\n[root@linuxprobe ~]# mdadm -D \/dev\/md0\r\n\/dev\/md0:\r\n Version : 1.2\r\n Creation Time : Thu Jan 14 06:12:32 2021\r\n Raid Level : raid5\r\n Array Size : 41908224 (39.97 GiB 42.91 GB)\r\n Used Dev Size : 20954112 (19.98 GiB 21.46 GB)\r\n Raid Devices : 3\r\n Total Devices : 4\r\n Persistence : Superblock is persistent\r\n\r\n Update Time : Thu Jan 14 06:24:38 2021\r\n State : clean \r\n Active Devices : 3\r\n Working Devices : 3\r\n Failed Devices : 1\r\n Spare Devices : 0\r\n\r\n Layout : left-symmetric\r\n Chunk Size : 512K\r\n\r\nConsistency Policy : resync\r\n\r\n Name : localhost.localdomain:0 (local to host localhost.localdomain)\r\n UUID : cf0c34b6:3b08edfb:85dfa14f:e2bffc1e\r\n Events : 37\r\n\r\n Number Major Minor RaidDevice State\r\n 3 8 64 0 active sync \/dev\/sde\r\n 1 8 32 1 active sync \/dev\/sdc\r\n 4 8 48 2 active sync \/dev\/sdd\r\n\r\n 0 8 16 - faulty \/dev\/sdb<\/strong><\/pre>\n
7.1.4 \u5220\u9664\u78c1\u76d8\u9635\u5217<\/strong><\/span><\/h6>\n
[root@linuxprobe ~]# umount \/RAID\r\n[root@linuxprobe ~]# mdadm \/dev\/md0 -f \/dev\/sdc\r\nmdadm: set \/dev\/sdc faulty in \/dev\/md0\r\n[root@linuxprobe ~]# mdadm \/dev\/md0 -f \/dev\/sdd\r\nmdadm: set \/dev\/sdd faulty in \/dev\/md0\r\n[root@linuxprobe ~]# mdadm \/dev\/md0 -f \/dev\/sde\r\nmdadm: set \/dev\/sde faulty in \/dev\/md0\r\n<\/pre>\n
[root@linuxprobe ~]# mdadm \/dev\/md0 -r \/dev\/sdb\r\nmdadm: hot removed \/dev\/sdb from \/dev\/md0\r\n[root@linuxprobe ~]# mdadm \/dev\/md0 -r \/dev\/sdc\r\nmdadm: hot removed \/dev\/sdc from \/dev\/md0\r\n[root@linuxprobe ~]# mdadm \/dev\/md0 -r \/dev\/sdd\r\nmdadm: hot removed \/dev\/sdd from \/dev\/md0\r\n[root@linuxprobe ~]# mdadm \/dev\/md0 -r \/dev\/sde\r\nmdadm: hot removed \/dev\/sde from \/dev\/md0\r\n<\/pre>\n
[root@linuxprobe ~]# mdadm -D \/dev\/md0\r\n\/dev\/md0:\r\n Version : 1.2\r\n Creation Time : Fri Jan 15 08:53:41 2021\r\n Raid Level : raid5\r\n Array Size : 41908224 (39.97 GiB 42.91 GB)\r\n Used Dev Size : 20954112 (19.98 GiB 21.46 GB)\r\n Raid Devices : 3\r\n Total Devices : 0\r\n Persistence : Superblock is persistent\r\n\r\n Update Time : Fri Jan 15 09:00:57 2021\r\n State : clean, FAILED \r\n Active Devices : 0\r\n Failed Devices : 0\r\n Spare Devices : 0\r\n\r\n Layout : left-symmetric\r\n Chunk Size : 512K\r\n\r\nConsistency Policy : resync\r\n\r\n Number Major Minor RaidDevice State\r\n - 0 0 0 removed<\/strong>\r\n - 0 0 1 removed<\/strong>\r\n - 0 0 2 removed<\/strong>\r\n<\/pre>\n
[root@linuxprobe ~]# mdadm --stop \/dev\/md0\r\nmdadm: stopped \/dev\/md0\r\n[root@linuxprobe ~]# ls \/dev\/md0\r\nls: cannot access '\/dev\/md0': No such file or directory<\/pre>\n