📄 raid.html
字号:
class="DEVICENAME">/dev/ccd0c</tt>. The <tt class="FILENAME">/dev/</tt> portion isoptional.</dd><dt><a href="raid.html#CO-CCD-INTERLEAVE"><img src="./imagelib/callouts/2.png" hspace="0"vspace="0" border="0" alt="(2)" /></a></dt><dd>The interleave for the file system. The interleave defines the size of a stripe indisk blocks, each normally 512 bytes. So, an interleave of 32 would be 16,384 bytes.</dd><dt><a href="raid.html#CO-CCD-FLAGS"><img src="./imagelib/callouts/3.png" hspace="0"vspace="0" border="0" alt="(3)" /></a></dt><dd>Flags for <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccdconfig</span>(8)</span>. If you want to enable drive mirroring,you can specify a flag here. This configuration does not provide mirroring for <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ccd</span>(4)</span>, so it is set at 0(zero).</dd><dt><a href="raid.html#CO-CCD-DEVS"><img src="./imagelib/callouts/4.png" hspace="0"vspace="0" border="0" alt="(4)" /></a></dt><dd>The final arguments to <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccdconfig</span>(8)</span> are the devices to place into the array.Use the complete pathname for each device.</dd></dl></div><p>After running <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccdconfig</span>(8)</span> the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccd</span>(4)</span> is configured. A file system can be installed.Refer to <span class="CITEREFENTRY"><span class="REFENTRYTITLE">newfs</span>(8)</span>for options, or simply run:</p><pre class="PROGRAMLISTING">newfs /dev/ccd0c</pre></div><div class="SECT4"><h4 class="SECT4"><a id="CCD-AUTO" name="CCD-AUTO">12.4.1.1.4. Making it AllAutomatic</a></h4><p>Generally, you will want to mount the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccd</span>(4)</span> upon each reboot. To do this, you mustconfigure it first. Write out your current configuration to <ttclass="FILENAME">/etc/ccd.conf</tt> using the following command:</p><pre class="PROGRAMLISTING">ccdconfig -g > /etc/ccd.conf</pre><p>During reboot, the script <tt class="COMMAND">/etc/rc</tt> runs <ttclass="COMMAND">ccdconfig -C</tt> if <tt class="FILENAME">/etc/ccd.conf</tt> exists. Thisautomatically configures the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccd</span>(4)</span> so it can be mounted.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> If you are booting into single user mode, before you can <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">mount</span>(8)</span> the <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ccd</span>(4)</span>, you need to issuethe following command to configure the array:</p><pre class="PROGRAMLISTING">ccdconfig -C</pre></blockquote></div><p>To automatically mount the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">ccd</span>(4)</span>, place an entry for the <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">ccd</span>(4)</span> in <ttclass="FILENAME">/etc/fstab</tt> so it will be mounted at boot time:</p><pre class="PROGRAMLISTING">/dev/ccd0c /media ufs rw 2 2</pre></div></div><div class="SECT3"><h3 class="SECT3"><a id="VINUM" name="VINUM">12.4.1.2. The Vinum Volume Manager</a></h3><p>The Vinum Volume Manager is a block device driver which implements virtual diskdrives. It isolates disk hardware from the block device interface and maps data in wayswhich result in an increase in flexibility, performance and reliability compared to thetraditional slice view of disk storage. <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">vinum</span>(8)</span> implements the RAID-0, RAID-1 and RAID-5models, both individually and in combination.</p><p>See <a href="vinum-vinum.html">Chapter 13</a> for more information about <spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">vinum</span>(8)</span>.</p></div></div><div class="SECT2"><h2 class="SECT2"><a id="RAID-HARD" name="RAID-HARD">12.4.2. Hardware RAID</a></h2><p>FreeBSD also supports a variety of hardware <acronym class="ACRONYM">RAID</acronym>controllers. These devices control a <acronym class="ACRONYM">RAID</acronym> subsystemwithout the need for FreeBSD specific software to manage the array.</p><p>Using an on-card <acronym class="ACRONYM">BIOS</acronym>, the card controls most ofthe disk operations itself. The following is a brief setup description using a <acronymclass="ACRONYM">Promise IDE RAID</acronym> controller. When this card is installed andthe system is started up, it displays a prompt requesting information. Follow theinstructions to enter the card's setup screen. From here, you have the ability to combineall the attached drives. After doing so, the disk(s) will look like a single drive toFreeBSD. Other <acronym class="ACRONYM">RAID</acronym> levels can be set upaccordingly.</p></div><div class="SECT2"><h2 class="SECT2"><a id="AEN16950" name="AEN16950">12.4.3. Rebuilding ATA RAID1Arrays</a></h2><p>FreeBSD allows you to hot-replace a failed disk in an array. This requires that youcatch it before you reboot.</p><p>You will probably see something like the following in <ttclass="FILENAME">/var/log/messages</tt> or in the <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">dmesg</span>(8)</span> output:</p><pre class="PROGRAMLISTING">ad6 on monster1 suffered a hard error.ad6: READ command timeout tag=0 serv=0 - resettingad6: trying fallback to PIO modeata3: resetting devices .. donead6: hard error reading fsbn 1116119 of 0-7 (ad6 bn 1116119; cn 1107 tn 4 sn 11) status=59 error=40ar0: WARNING - mirror lost</pre><p>Using <span class="CITEREFENTRY"><spanclass="REFENTRYTITLE">atacontrol</span>(8)</span>, check for further information:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">atacontrol list</kbd>ATA channel 0: Master: no device present Slave: acd0 <HL-DT-ST CD-ROM GCR-8520B/1.00> ATA/ATAPI rev 0ATA channel 1: Master: no device present Slave: no device presentATA channel 2: Master: ad4 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5 Slave: no device presentATA channel 3: Master: ad6 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5 Slave: no device present<samp class="PROMPT">#</samp> <kbd class="USERINPUT">atacontrol status ar0</kbd>ar0: ATA RAID1 subdisks: ad4 ad6 status: DEGRADED</pre><div class="PROCEDURE"><ol type="1"><li><p>You will first need to detach the disk from the array so that you can safely removeit:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">atacontrol detach 3</kbd></pre></li><li><p>Replace the disk.</p></li><li><p>Reattach the disk as a spare:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">atacontrol attach 3</kbd>Master: ad6 <MAXTOR 6L080J4/A93.0500> ATA/ATAPI rev 5Slave: no device present</pre></li><li><p>Rebuild the array:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">atacontrol rebuild ar0</kbd></pre></li><li><p>The rebuild command hangs until complete. However, it is possible to open anotherterminal (using <b class="KEYCAP">Alt</b>+<b class="KEYCAP">F<varclass="REPLACEABLE">n</var></b>) and check on the progress by issuing the followingcommand:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">dmesg | tail -10</kbd>[output removed]ad6: removed from configurationad6: deleted from ar0 disk1ad6: inserted into ar0 disk1 as spare<samp class="PROMPT">#</samp> <kbd class="USERINPUT">atacontrol status ar0</kbd>ar0: ATA RAID1 subdisks: ad4 ad6 status: REBUILDING 0% completed</pre></li><li><p>Wait until this operation completes.</p></li></ol></div></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="disks-adding.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="creating-cds.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Adding Disks</td><td width="34%" align="center" valign="top"><a href="disks.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Creating and Using Optical Media (CDs &DVDs)</td></tr></table></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -