Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of expanding disk space in xen virtual machine

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

Xen virtual machine expansion of disk space, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

With the extensive use of virtualization technology, there are more ideas and beginnings to use virtualization, such as directly expanding disk space. I recommend adding a new disk, which is in line with the normal use of physical machines.

Another way to increase disk space is to directly expand the space of existing disks, which is adopted in this article.

1. View virtual machine configuration fil

Xm list

2. Dd2 virtual machine adopts / data/dd2.img

3. Directly expand existing virtual disk space

Now view the virtual machine disk file size

Ll-h

Directly extend virtual machine disk files

Dd if=/dev/sdb1 bs=1024M count=4 > > / data/dd2.img

Now that it has been expanded to 10G, let's go to the virtual machine for configuration.

4. Boot and enter the virtual machine and partition

Virt-manager &

(1) enter the virtual machine console

(2) View disk partitions

See that the disk space has not changed, and the disk size has been expanded to 10G. By adding extended space directly, you can create another partition and use it directly. Merge the newly created partition directly into the current LVM logical volume.

(3) Subarea

Create a new primary partition / dev/xvda3 with the newly added unused disk space behind the disk and identify the disk as a lvm partition

Fdisk / dev/xvda

N

P

three

T

three

8e

W

5. Merge the new partition into the LVM logical volume

(1) create a physical volume

Pvcreate / dev/xvda3

Pvs

(2) create a logical volume group

Vgs

Vgextend VolGroup / dev/xvda3

(3) extend existing logical volumes

Lvs

Lvextend-l + 100%FREE / dev/VolGroup/lv_root

(4) resize extended logic partition

Resize2fs / dev/VolGroup/lv_root

For the second time, add disk space and complete expansion.

After reading the above, have you mastered the method of expanding disk space of xen virtual machine? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report