uTools-Manuals/docs/linux/lvcreate.html
2019-04-21 11:50:48 +08:00

19 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="lvcreate">lvcreate</h1>
<p>用于创建LVM的逻辑卷</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>lvcreate命令</strong> 用于创建LVM的逻辑卷。逻辑卷是创建在卷组之上的。逻辑卷对应的设备文件保存在卷组目录下例如在卷组“vg1000”上创建一个逻辑卷“lvol0”则此逻辑卷对应的设备文件为“/dev/vg1000/lvol0”。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">lvcreate(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-L指定逻辑卷的大小单位为“kKmMgGtT”字节
-l指定逻辑卷的大小LE数</code></pre>
<h3 id="参数">参数</h3>
<p>逻辑卷:指定要创建的逻辑卷名称。</p>
<h3 id="实例">实例</h3>
<p>使用lvcreate命令在卷组“vg1000”上创建一个200MB的逻辑卷。在命令行中输入下面的命令</p>
<pre><code class="language-bash">[root@localhost ~]# lvcreate -L 200M vg1000 #创建大小为200M的逻辑卷</code></pre>
<p>输出信息如下:</p>
<pre><code class="language-bash">Logical volume &quot;lvol0&quot; created</code></pre>
<p>说明创建成功后新的逻辑卷“lvol0”将通过设备文件<code>/dev/vg1000/lvol0</code>进行访问。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->