在对Centos 7虚拟机扩充硬盘大小遇到如下问题,内容如下:
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
结合上面的例子的具体操作步骤为:
1.首先要再创建一个物理分区
(使用fdisk
可以用fdisk -l命令来查看已有分区
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![【转】Insufficient <wbr>free <wbr>space: <wbr>25 <wbr>extents <wbr>needed, <wbr>but <wbr>only <wbr>0 <wbr>available <wbr>问题解决](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
用fdisk
重启机器生效。
2.接下来创建sda3分区
/dev/sda3这个路径可以参照 pvdisplay这个命令中sda1的路径,一般都是在dev下。
3.为卷组VolGroup00添加新的物理卷sda3来增大卷组的容量
用vgdisplay来查看卷组名称。
4.现在才能扩展逻辑卷的大小
用lvdisplay查看逻辑卷绝对路径
*5.最后要使用resizefs2命令重新加载逻辑卷的大小才能生效。
如果不用这个命令的话,你会发现用df -h命令查看扩展的逻辑卷大小还是原来的值,没有发生变化。即使重启也不会变,所以一定要执行 resize2fs命令。