Linux XenServer virtual machine expansion LVM disk partition

Source: Internet
Author: User
Description: XenServer installed in the virtual machine, the partition is using the LVM disk partition
requirements: now need to expand the virtual machine root partition/
Specific actions:
First, use Xencenter to increase the disk capacity of the virtual machine, as shown in the following figure
Increase Current disk to 50GB
Note: Must be in the virtual organization machine state
Second, look at the hard disk capacity
Df-h #可以看到此时根分区还是12G, no change.
Fdisk-l #已经可以看到整个磁盘容量变为53 6GB.
Third, create a new disk partition
Fdisk/dev/xvda #对磁盘/dev/xvda to operate
P #查看当前分区
N #创建新分区
4 #创建第四个主分区
T #修改分区类型
8e #输入 8e, using LVM type on behalf of partitions
P #查看当前分区状态
W #保存以上操作, otherwise you cannot create a new partition
After restarting the system, do the following
Iv. Add the newly created partition/dev/xvda4 to the root partition/same LVM
MKFS.EXT3/DEV/XVDA4 #格式化分区, you need to wait a while.
PVCREATE/DEV/XVDA4 #创建一个新的LVM分区
Pvdisplay #查看已经存在的pv (physical volume)
Vgdisplay #查看当前已经存在的vg (Logical Volume Group)
Lvdisplay #查看已经存在的lv (Logical volume)
Vgextend volgroup00/dev/xvda4 #把/dev/xvda4 Join the same VG AS/directory (Logical Volume Group)
Lvextend-l +30.01gb-n/dev/volgroup00/logvol00 #扩容lv (logical volume) LogVol00
E2fsck-f/dev/volgroup00/logvol00 #检查
Resize2fs/dev/volgroup00/logvol00 #生效
Df-h #查看挂载状态, display/partition has been enlarged
at this point, the xenserver virtual machine expands the LVM disk partition complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.