<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>raid 5 &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/raid-5/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Mon, 13 Jun 2022 12:00:54 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Raid 5/Raid 6 Mdadm 指令</title>
		<link>https://richliu.com/2010/01/20/839/raid-5raid-6-mdadm-%e6%8c%87%e4%bb%a4/</link>
					<comments>https://richliu.com/2010/01/20/839/raid-5raid-6-mdadm-%e6%8c%87%e4%bb%a4/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 20 Jan 2010 05:17:59 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid 5]]></category>
		<category><![CDATA[raid 6]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=839</guid>

					<description><![CDATA[<p>最近在測 mdadm raid 5, raid 6, 順手記錄一下相關指令 Kernel 設定部份及 Appl [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2010/01/20/839/raid-5raid-6-mdadm-%e6%8c%87%e4%bb%a4/">Raid 5/Raid 6 Mdadm 指令</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近在測 mdadm raid 5, raid 6, 順手記錄一下相關指令</p>
<p>Kernel 設定部份及 Application 太簡單, 不再贊述.<br /><span id="more-839"></span><br />建立一個 Raid 5 Device<br />$ mdadm &#8211;create /dev/md0 -l 5 -n 4 -f /dev/sdb4 /dev/sdc[123]<br />如果是 Raid 6<br />$ mdadm &#8211;create /dev/md0 -l 6 -n 4 -f /dev/sdb4 /dev/sdc[123]</p>
<p>設定一個 Device 為 Fail<br />$ mdadm &#8211;manage &#8211;set-faulty /dev/md0 /dev/sdb4</p>
<p>移除一個 Device<br />$ mdadm &#8211;manage &#8211;remove /dev/md0 /dev/sdb4</p>
<p>將移除 Device 加回來<br />$ mdadm &#8211;manage &#8211;add /dev/md0 /dev/sdb4</p>
<p>將目前的 Raid Information 存到 mdadm 內<br />$ mdadm &#8211;detail -s &gt;&gt; /etc/mdadm/mdadm.conf</p>
<p>如果己經有 Raid 5 System, 結果系統沒有起來, 之前有做過 mdadm &#8211;detail -s &gt;&gt; /etc/mdadm/mdadm.conf 的指令, 可以用這個指令 Assemble, mdadm 會去 /etc/mdadm/mdadm.conf 下 search md0,<br />$ mdadm &#8211;assemble &#8211;force &#8211;scan /dev/md0<br />如果沒有做, 可以改用這一個指令重建 Raid<br />$ mdadm &#8211;assemble &#8211;force /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1</p>


<p>Raid 0</p>



<pre class="wp-block-code"><code>$ mdadm --create /dev/md0 -l 0 -n 2 -f /dev/nvme&#91;01]n1 </code></pre>
<p>The post <a rel="nofollow" href="https://richliu.com/2010/01/20/839/raid-5raid-6-mdadm-%e6%8c%87%e4%bb%a4/">Raid 5/Raid 6 Mdadm 指令</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2010/01/20/839/raid-5raid-6-mdadm-%e6%8c%87%e4%bb%a4/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
