With the extensive use of virtualization technology, there are more and more ideas about using virtualization, such as directly expanding the disk space. In this case, I recommend the method of adding a new disk, which is consistent with the normal use of physical machines. Way.
There is another way to increase disk space, which is to directly expand the space of the existing disk. This method is used in this article.
1. View the virtual machine configuration file
xm list
##2. The dd2 virtual machine uses /data /dd2.img
3. Directly expand the existing virtual disk space
Now check the virtual machine disk file size ll -h4. Start and enter the virtual machine and partition
virt-manager &(1) Enter the virtual machine Machine console
(2) Check the disk partition
It is found that the disk space has not changed and the disk space has not changed. The size has been expanded to 10G. If you directly add the expanded space, you can create another partition and use it directly. Merge the newly created partition directly into the current LVM logical volume.
(3) Partition
Add the new disk Add the unused disk space to create a new primary partition /dev/xvda3, and identify the disk as the lvm partition
fdisk /dev/xvda
n
p
##3t
3
8e
w
(1) Create a physical volume
pvcreate /dev/xvda3
pvs
##(2) Create a logical volume group
vgs
vgextend VolGroup /dev/xvda3
##(3) Extend the existing logical volume
lvs
##lvextend -l 100%FREE /dev/VolGroup/lv_root
(4) resize extended logical partition
resize2fs /dev/VolGroup/lv_root
At this time, add disk space and the expansion is completed.
The above is the detailed content of How to expand disk space of xen virtual machine. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version
Visual web development tools

Atom editor mac version download
The most popular open source editor