{"id":839,"date":"2017-11-04T02:48:42","date_gmt":"2017-11-03T17:48:42","guid":{"rendered":"http:\/\/bellsprite.com\/?p=839"},"modified":"2017-11-15T13:23:54","modified_gmt":"2017-11-15T04:23:54","slug":"%e4%bb%8e-raid1-%e7%9a%84%e5%8d%95%e7%9b%98%e4%b8%ad%e5%8f%96%e5%87%ba%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/bellsprite.com\/?p=839","title":{"rendered":"\u4ece raid1 \u7684\u5355\u76d8\u4e2d\u53d6\u51fa\u6587\u4ef6"},"content":{"rendered":"<p dir=\"ltr\" style=\"text-align: center;\"><a href=\"http:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2017\/11\/ct06158TBPlatten_84415-ll-jg_PR.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-859\" alt=\"harddisk\" src=\"http:\/\/bellsprite.com\/blog\/wp-content\/uploads\/2017\/11\/ct06158TBPlatten_84415-ll-jg_PR.jpg\" width=\"2048\" height=\"1297\" srcset=\"https:\/\/bellsprite.com\/wp-content\/uploads\/2017\/11\/ct06158TBPlatten_84415-ll-jg_PR.jpg 2048w, https:\/\/bellsprite.com\/wp-content\/uploads\/2017\/11\/ct06158TBPlatten_84415-ll-jg_PR-300x189.jpg 300w, https:\/\/bellsprite.com\/wp-content\/uploads\/2017\/11\/ct06158TBPlatten_84415-ll-jg_PR-1024x648.jpg 1024w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<p dir=\"ltr\">\u4eca\u5929\u7528\u4e24\u5757\u65b0\u786c\u76d8\uff0c\u8bd5\u4e86\u4e00\u4e0b\u7528synology\u521b\u5efaraid1\u540e\uff0c\u6545\u610f\u7834\u574f\u5176\u4e2d\u4e00\u7247\u786c\u76d8\uff0c\u518d\u4ece\u5269\u4f59\u7684\u53e6\u4e00\u5757\u786c\u76d8\u4e2d\u6062\u590d\u6587\u4ef6\u3002\u5b9e\u6d4b\u7ed9synology\u4e00\u5757\u65b0\u786c\u76d8\uff0c\u5b83\u81ea\u5df1\u53ef\u4ee5\u4fee\u590draid1\u3002<\/p>\n<p dir=\"ltr\">\u4e0d\u8fc7\u6bd4\u8f83\u5c34\u5c2c\u7684\u662f\uff0c\u5f53\u6211\u7834\u574fraid1\u540e\u518d\u62d4\u6389\u4e24\u5757\u786c\u76d8\uff0c\u7136\u540e\u91cd\u65b0\u63d2\u4e0a\uff0c\u8fd9\u65f6synology\u5c31\u65e0\u6cd5\u8bc6\u522b\u8fd9\u4e24\u5757\u786c\u76d8\u5185\u7684raid1\u4e86\uff0c\u66f4\u65e0\u6cd5\u4fee\u590d\uff0c\u8fd9\u5c31\u5f88\u6076\u5fc3\u4e86\u3002<\/p>\n<p dir=\"ltr\">\u4e0a\u7f51\u67e5\u4e86\u4e00\u4e0b\uff0c\u4fee\u590d\u65b9\u6cd5\u662f\u7528linux\u4e0b\u7684mdadm\u6302\u8f7draid1\u4e2d\u5269\u4e0b\u7684\u4e00\u5757\u786c\u76d8\uff0c\u4ece\u4e2d\u53d6\u51fa\u6587\u4ef6\u3002<\/p>\n<p>&nbsp;<\/p>\n<p dir=\"ltr\">\u5148\u8bf4\u4e00\u4e0b\uff0c\u6211\u662f\u5728windows\u865a\u62df\u673a hyper-v \u91cc\u521b\u5efa\u4e86\u4e00\u4e2a centos6.9 \u7684\u865a\u62df\u673a\uff0c\u628a\u786c\u76d8\u6302\u5728\u865a\u62df\u673a\u4e0a\u6d4b\u8bd5\u7684\u3002<\/p>\n<p>&nbsp;<\/p>\n<p dir=\"ltr\">\u5b98\u65b9\u7ed9\u7684\u547d\u4ee4\u662f<\/p>\n<p dir=\"ltr\"># mdadm -Asf &amp;&amp; vgchange -ay<\/p>\n<p dir=\"ltr\">\u6267\u884c\u4e4b\u540e\u4f1a\u589e\u52a0\u4e00\u4e2a \/dev\/md*, \u6bd4\u5982\u6211\u8fd9\u91cc\u589e\u52a0\u7684\u662f \/dev\/md4\u3002\u6709\u4e86\u8fd9\u4e2amd\u4e4b\u540e\u53ef\u4ee5\u7528<\/p>\n<p dir=\"ltr\"># mount \/dev\/md4 \/{empty_folder}<\/p>\n<p dir=\"ltr\">\u547d\u4ee4\u6302\u8f7d\u786c\u76d8\u5230\u6307\u5b9a\u76ee\u5f55\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u4ece\u8fd9\u4e2a\u76ee\u5f55\u4e2d\u8bbf\u95ee\u539f\u59cb raid1 \u4e2d\u7684\u6587\u4ef6\u4e86\u3002<\/p>\n<p dir=\"ltr\">\u7528\u5b8c\u4ee5\u540e\u7528<\/p>\n<p dir=\"ltr\"># umount \/{empty_folder}<\/p>\n<p dir=\"ltr\">\u89e3\u9664\u6302\u8f7d\uff0c\u7136\u540e\u7528<\/p>\n<p dir=\"ltr\"># mdadm &#8211;stop \/dev\/md4<\/p>\n<p dir=\"ltr\">\u89e3\u9664\u5bf9 raid \u786c\u76d8\u7684\u89e3\u6790\u3002<\/p>\n<p>&nbsp;<\/p>\n<p dir=\"ltr\">\u4e0d\u8fc7\u4e4b\u524d\u4e0d\u77e5\u9053\u600e\u4e48\u56de\u4e8b\uff0c\u5b98\u65b9\u547d\u4ee4\u6211\u6ca1\u6267\u884c\u6210\u529f\u3002\u540e\u6765\u7528 blkid , fdisk -l \u7b49\u547d\u4ee4\u8c03\u67e5\u8fc7\uff0c\u6839\u636e\u79cd\u79cd\u8ff9\u8c61\u5f97\u77e5\u786c\u76d8\u4e0a\u7684\u4e09\u4e2a\u5206\u533a\uff0c\u6211\u9700\u8981\u7684\u662f \/dev\/sdb3\u3002<\/p>\n<p dir=\"ltr\">\u4e4b\u540e\u6267\u884c<\/p>\n<p dir=\"ltr\"># mdadm &#8211;assemble &#8211;run \/dev\/md127 \/dev\/sdb3<\/p>\n<p dir=\"ltr\">mdadm: \/dev\/md127 has been started with 1 drive (out of 2).<\/p>\n<p dir=\"ltr\">\uff08\u8fd9\u91ccmd127\u662f\u968f\u4fbf\u5199\u7684\uff0c\u5e94\u8be5\u4e0d\u662f\u975e\u5f97\u7528\u8fd9\u4e2a\u540d\u5b57\u3002\uff09<\/p>\n<p dir=\"ltr\">\u4e4b\u540e\u6267\u884c<\/p>\n<p dir=\"ltr\"># mount \/dev\/md127 \/{empty_folder}<\/p>\n<p dir=\"ltr\">\u6302\u8f7d\u786c\u76d8\u540e\uff0c\u4e00\u6837\u53ef\u4ee5\u8bbf\u95ee\u3002<\/p>\n<p dir=\"ltr\">\u53d6\u6d88\u7684\u547d\u4ee4\u5206\u522b\u662f<\/p>\n<p dir=\"ltr\"># umount \/{empty_folder}<\/p>\n<p dir=\"ltr\">\u6216\u8005<\/p>\n<p dir=\"ltr\"># umount \/dev\/md127<\/p>\n<p dir=\"ltr\">\u7136\u540e\u6267\u884c<\/p>\n<p dir=\"ltr\"># mdadm &#8211;stop \/dev\/md127<\/p>\n<p dir=\"ltr\">mdadm: stopped \/dev\/md127<\/p>\n<p>&nbsp;<\/p>\n<p dir=\"ltr\">\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u6709\u4eba\u8bf4\u9700\u8981\u7528<\/p>\n<p dir=\"ltr\"># mdadm &#8211;examine &#8211;scan &gt;&gt; \/etc\/mdadm.conf<\/p>\n<p dir=\"ltr\">\u6765\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff0c\u5c31\u53ef\u4ee5\u5728\u542f\u52a8\u65f6\u52a0\u8f7d\u78c1\u76d8\u9635\u5217\u4e86\uff0c\u4e0d\u8fc7\u6211\u8fd9\u6b21\u53ea\u662f\u60f3\u77e5\u9053\u53d6\u51fa\u6587\u4ef6\u7684\u65b9\u6cd5\uff0c\u61d2\u5f97\u91cd\u542f\u6d4b\u8bd5\u4e86\uff0c\u8fd9\u91cc\u53ea\u505a\u8bb0\u5f55\uff0c\u4e0d\u518d\u6d4b\u8bd5\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u7528\u4e24\u5757\u65b0\u786c\u76d8\uff0c\u8bd5\u4e86\u4e00\u4e0b\u7528synology\u521b\u5efaraid1\u540e\uff0c\u6545\u610f\u7834\u574f\u5176\u4e2d\u4e00\u7247\u786c\u76d8\uff0c\u518d\u4ece\u5269\u4f59\u7684\u53e6\u4e00\u5757\u786c\u76d8\u4e2d\u6062\u590d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"views":11180,"_links":{"self":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=839"}],"version-history":[{"count":4,"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":860,"href":"https:\/\/bellsprite.com\/index.php?rest_route=\/wp\/v2\/posts\/839\/revisions\/860"}],"wp:attachment":[{"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bellsprite.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}