vsphere 6.7 under Linux disk space for expansion - increasing the volume group space


Off the virtual machine, click the virtual machine, and then set up (directly modify the hard disk size, note that if there is a snapshot, you must first delete a snapshot, can expansion)

clipboard

After the expansion, once again view the amount of disk space

fdisk -l

clipboard[1]

Add District

1: fdisk / dev / sda

clipboard[2]

2: Judging from our increased partition number should be 3 (dev / sda1, dev / sda2 ...... next should be dev / sda3, right)

Type n, add a partition to give:

clipboard[3]

3: Type p, primary partition, and type 3 (number):

clipboard[4]

Because the first two partition starts from 20480, the end of the hard disk 51200

clipboard[5]

4: The default can start sector and the end sector (two type Enter) Type t, modify the partition type 8E:

clipboard[6]

5: Type w, write the partition table, and then reboot:

clipboard[7]

Initializing the partition, the volume group added

1: the volume expansion, the group added to the LVM

pvcreate / dev sda3 initialization just partition /

clipboard[8]

2: Check the volume group and add the initialization of the virtual partition to the volume group

Vg_root new volume group is added to increase the capacity of the physical volume group of volumes sda3

vgextend volgroup / dev / sda3

clipboard[9]

Expand the size of the logical volume

1: Now you can extend the logical volume size

lvextend -L +20G /dev/mapper/VolGroup-lv_root

clipboard[10]

2: Use resizefs2 last command to reload the logical volume size to take effect

resize2fs /dev/mapper/VolGroup-lv_root

3: Then again see the size of the logical volume

clipboard[11]

Guess you like

Origin blog.51cto.com/1010598/2438479