📄 vinum-config.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Configuring Vinum</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="The Vinum Volume Manager" href="vinum-vinum.html" /><link rel="PREVIOUS" title="Object Naming" href="vinum-object-naming.html" /><link rel="NEXT" title="Using Vinum for the Root Filesystem" href="vinum-root.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="vinum-object-naming.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 17 The Vinum Volume Manager</td><td width="10%" align="right" valign="bottom"><a href="vinum-root.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="VINUM-CONFIG" name="VINUM-CONFIG">17.8 ConfiguringVinum</a></h1><p>The <tt class="FILENAME">GENERIC</tt> kernel does not contain Vinum. It is possible tobuild a special kernel which includes Vinum, but this is not recommended. The standardway to start Vinum is as a kernel module (<acronym class="ACRONYM">kld</acronym>). You donot even need to use <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=kldload&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">kldload</span>(8)</span></a> for Vinum:when you start <a href="http://www.FreeBSD.org/cgi/man.cgi?query=vinum&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">vinum</span>(8)</span></a>, it checkswhether the module has been loaded, and if it is not, it loads it automatically.</p><div class="SECT2"><h2 class="SECT2"><a id="AEN26329" name="AEN26329">17.8.1 Startup</a></h2><p>Vinum stores configuration information on the disk slices in essentially the same formas in the configuration files. When reading from the configuration database, Vinumrecognizes a number of keywords which are not allowed in the configuration files. Forexample, a disk configuration might contain the following text:</p><pre class="PROGRAMLISTING">volume myvol state upvolume bigraid state downplex name myvol.p0 state up org concat vol myvolplex name myvol.p1 state up org concat vol myvolplex name myvol.p2 state init org striped 512b vol myvolplex name bigraid.p0 state initializing org raid5 512b vol bigraidsd name myvol.p0.s0 drive a plex myvol.p0 state up len 1048576b driveoffset 265b plexoffset 0bsd name myvol.p0.s1 drive b plex myvol.p0 state up len 1048576b driveoffset 265b plexoffset 1048576bsd name myvol.p1.s0 drive c plex myvol.p1 state up len 1048576b driveoffset 265b plexoffset 0bsd name myvol.p1.s1 drive d plex myvol.p1 state up len 1048576b driveoffset 265b plexoffset 1048576bsd name myvol.p2.s0 drive a plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 0bsd name myvol.p2.s1 drive b plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 524288bsd name myvol.p2.s2 drive c plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 1048576bsd name myvol.p2.s3 drive d plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 1572864bsd name bigraid.p0.s0 drive a plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 0bsd name bigraid.p0.s1 drive b plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 4194304bsd name bigraid.p0.s2 drive c plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 8388608bsd name bigraid.p0.s3 drive d plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 12582912bsd name bigraid.p0.s4 drive e plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 16777216b</pre><p>The obvious differences here are the presence of explicit location information andnaming (both of which are also allowed, but discouraged, for use by the user) and theinformation on the states (which are not available to the user). Vinum does not storeinformation about drives in the configuration information: it finds the drives byscanning the configured disk drives for partitions with a Vinum label. This enables Vinumto identify drives correctly even if they have been assigned different <spanclass="TRADEMARK">UNIX</span>® drive IDs.</p><div class="SECT3"><h3 class="SECT3"><a id="VINUM-RC-STARTUP" name="VINUM-RC-STARTUP">17.8.1.1 AutomaticStartup</a></h3><p>In order to start Vinum automatically when you boot the system, ensure that you havethe following line in your <tt class="FILENAME">/etc/rc.conf</tt>:</p><pre class="PROGRAMLISTING">start_vinum="YES" # set to YES to start vinum</pre><p>If you do not have a file <tt class="FILENAME">/etc/rc.conf</tt>, create one with thiscontent. This will cause the system to load the Vinum <acronymclass="ACRONYM">kld</acronym> at startup, and to start any objects mentioned in theconfiguration. This is done before mounting file systems, so it is possible toautomatically <a href="http://www.FreeBSD.org/cgi/man.cgi?query=fsck&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">fsck</span>(8)</span></a> and mount filesystems on Vinum volumes.</p><p>When you start Vinum with the <tt class="COMMAND">vinum start</tt> command, Vinumreads the configuration database from one of the Vinum drives. Under normalcircumstances, each drive contains an identical copy of the configuration database, so itdoes not matter which drive is read. After a crash, however, Vinum must determine whichdrive was updated most recently and read the configuration from this drive. It thenupdates the configuration if necessary from progressively older drives.</p></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="vinum-object-naming.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="vinum-root.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Object Naming</td><td width="34%" align="center" valign="top"><a href="vinum-vinum.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Using Vinum for the Root Filesystem</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -