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

21 lines
1.3 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="lvreduce">lvreduce</h1>
<p>收缩逻辑卷空间</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>lvreduce命令</strong> 用于减少LVM逻辑卷占用的空间大小。使用lvreduce命令收缩逻辑卷的空间大小有可能会删除逻辑卷上已有的数据所以在操作前必须进行确认。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">lvreduce(选项)(参数)</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>使用lvreduce命令减少指定的逻辑卷的空间大小。在命令行中输入下面的命令</p>
<pre><code class="language-bash">[root@localhost ~]# lvreduce -L -50M /dev/vg1000/lvol0 #将逻辑卷的空间大小减少50M</code></pre>
<p>输出信息如下:</p>
<pre><code class="language-bash">......省略部分输出内容......
Do you really want to reduce lvol0? [y/n]: y #确认操作
Reducing logical volume lvol0 to 252.00 MB
Logical volume lvol0 successfully resized</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->