{"id":97,"date":"2009-10-28T14:36:44","date_gmt":"2009-10-28T06:36:44","guid":{"rendered":"http:\/\/sashakrasnoyarsk.ru\/?p=97"},"modified":"2013-10-29T09:21:37","modified_gmt":"2013-10-29T02:21:37","slug":"questions-and-hints-about-linux-hardware-%d0%b4%d0%b5%d0%b3%d1%80%d0%b0%d0%b4%d0%b0%d1%86%d0%b8%d1%8f-software-raid","status":"publish","type":"post","link":"https:\/\/sashakrasnoyarsk.ru\/?p=97","title":{"rendered":"Questions and Hints about Linux hardware: \u0414\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u044f software RAID"},"content":{"rendered":"<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u043e\u0444\u0442\u043e\u0432\u044b\u043c\u0438 RAID \u0434\u0438\u0441\u043a\u0430\u043c\u0438<!--more--><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 RAID 1:<\/p>\n<pre>mdadm --create \/dev\/md0 --level=1 --raid-devices=3 --metadata=1.2 \/dev\/sda1 \/dev\/sdb1 \/dev\/sdc1<\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0440\u044d\u0439\u0434\u0430 md0:<\/p>\n<pre>mdadm --detail \/dev\/md0<\/pre>\n<p>\u041f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b \/dev\/sda1 \u043a\u0430\u043a \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0438\u0439:<\/p>\n<pre>mdadm --manage \/dev\/md0 --fail \/dev\/sda1<\/pre>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 md0 \u0440\u0430\u0437\u0434\u0435\u043b \/dev\/sda1:<\/p>\n<pre>mdadm --manage \/dev\/md0 --delete \/dev\/sda1<\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443 md0 \u0440\u0430\u0437\u0434\u0435\u043b \/dev\/sda1 (\u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0442\u0438\u043f \u0440\u0430\u0437\u0434\u0435\u043b\u0430 &#171;\u0442\u043e\u043c \u0434\u043b\u044f RAID&#187;):<\/p>\n<pre>mdadm --manage \/dev\/md0 --add \/dev\/sda1<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0443\u0447\u043d\u0443\u044e) \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 SW RAID \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433-\u0444\u0430\u0439\u043b:<\/p>\n<pre>mdadm --detail --scan --verbose &gt; \/etc\/mdadm\/mdadm.conf<\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<pre>mdadm --detail --scan --verbose &gt; \/etc\/mdadm.conf<\/pre>\n<p>\u0421\u043e\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre>mdadm --assemble \/dev\/md0<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435:<\/p>\n<pre>mdadm --assemble --auto=yes \/dev\/md0 \/dev\/sd[abc]1<\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 degraded, \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u044e\u0447 &#8212;run:<\/p>\n<pre>mdadm --assemble --auto=yes --run \/dev\/md0 \/dev\/sd[ab]1<\/pre>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 (\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439) \u043c\u0430\u0441\u0441\u0438\u0432 \u0435\u0449\u0451 \u043e\u0434\u043d\u0438\u043c \u0434\u0438\u0441\u043a\u043e\u043c:<\/p>\n<pre>mdadm --grow \/dev\/md0 --level=1 --raid-devices=4\r\nmdadm --manage \/dev\/md0 --add \/dev\/sdd1<\/pre>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432, \u0432\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u0441\u0443\u043f\u0435\u0440\u0431\u043b\u043e\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432 sda1&#8230;sdd1):<\/p>\n<pre>mdadm -S \/dev\/md0\r\nmdadm --zero-superblock \/dev\/sd[a-d]1<\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \/usr\/share\/doc\/mdadm\/README.recipes.gz<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u043e\u0444\u0442\u043e\u0432\u044b\u043c\u0438 RAID \u0434\u0438\u0441\u043a\u0430\u043c\u0438<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[68],"tags":[1383,1400,144,73,1384,1380,1387,1287,1382,1544,1381,1379,1386,72,74,1540,1545,1385,1389,1390,1388],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-hardware-linux-qh-qh","tag-add","tag-assemble","tag-create","tag-degradate","tag-delete","tag-detail","tag-devices","tag-fail","tag-grow","tag-linux","tag-manage","tag-mdadm","tag-metadata","tag-raid","tag-recovery","tag-software","tag-ubuntu","tag-verbose","tag-1389","tag-1390","tag-1388"],"_links":{"self":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=97"}],"version-history":[{"count":14,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":1038,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=\/wp\/v2\/posts\/97\/revisions\/1038"}],"wp:attachment":[{"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sashakrasnoyarsk.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}