Vmware virtual machine how to expand disk space (non-plug disk volume to achieve)

Virtual machine using a 25G disk, operating system centos7 installed, but the latter disk is not enough, you need to expand it (you can also choose to add a disk to achieve, can also be used in this way I will now describe to achieve ). Prior to the disk using xfs file system. Here is his own experience step;

1, the first is to expand the disk inside vmware

The original 25G, can now be expanded to 35G, wait a moment later. Open this virtual machine.

2, start the virtual machine, use fdisk -l command to see what new discoveries have not

 

 

 The original is 25g, now or this size, did not see an increase in the size of the space 10g, you know increases disk space is increased on the basis of the original disk.

3, it seems I can only start fdisk command to modify a disk, and my hard drive is / dev / sda

 

 

 I found no? Now disks, do increase, the newly added space 10G shows up on a plate, but in a different partition

4, modify the partition, except that the system boot partition as centos xfs file system is mounted directly, the root partition / lvm technique is to use a mount. So we need to change the partition type sda3

 

 We can now see the new sda3 is already the lvm partition type. Remember to save the last exit.

5, now operating lvm, but it needs to be noted that the above operation we showed / dev / sda3, but the system to reboot to get out. Therefore, before operating restart the machine.

After the restart now finished, ls / dev can see sda3 partition

6, using the file system is formatted partition sda3 xfs

 

 7, add pv, pv have to understand the students look at learning materials to learn about.

 

 8, extend vg, and add tags centos

 

9, extension lv

 

 10, using pvdisplay can see the new partition now has the added boost

 

 11, for the real xfs file system extension

 

 12, to see the effect

 

 The original root partition is 21G, now to 30G, that we add a success. 

Guess you like

Origin www.cnblogs.com/FengGeBlog/p/12146331.html