KVM下虚拟机CentOS6.2 LVM增加磁盘(2)

[root@svn ~]# resize2fs -p /dev/vg/lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg/lv_root is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 6
Performing an on-line resize of /dev/vg/lv_root to 22676480 (4k) blocks.

这里要等一会哦,80G呢,呵呵

The filesystem on /dev/vg/lv_root is now 22676480 blocks long.

[root@svn ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg-lv_root
                       86G  908M   80G   2% /
tmpfs                 499M     0  499M   0% /dev/shm
/dev/vda1             485M   51M  409M  12% /boot

OK,任务完成了哦。呵呵 ~~

命令说明:
pvcreate (创建物理卷)

pvdisplay (显示物理卷信息)

pvscan (扫描物理卷)
pvremove (删除物理卷)

vgcreate (创建卷组)

vgdisplay (显示卷组信息)

vgscan (扫描卷组)

vgextend (扩展卷组) 

vgextend vg1 /dev/sdb7  (把物理卷/dev/sdb7 加到vg1卷组中)

vgreduce (删除卷组中的物理卷)

vgreduce vg1 /dev/sdb7  (把物理卷/dev/sdb7 从卷组vg1中删除)

vgremove (删除卷组) 

vgremove vg1 (删除卷组vg1)

lvcreate (创建逻辑卷)

lvdisplay (显示逻辑卷信息)

lvscan (扫描逻辑卷)

lvextend (扩展逻辑卷)

lvextend -l +5G /dev/vg1/lvm1  (扩展逻辑卷/dev/vg1/lvm1 5个G)


lvreduce (减少LV大小) 

lvreduce -L-50M /dev/vg1/lvm1,调整lvm1分区大小,减小50M
lvremove (删除逻辑卷)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/b7861a68ded7555fcc9241f2b462299a.html