Home > OS >  Centos7.7 LVM was achieved by virtual machine add hard disk capacity
Centos7.7 LVM was achieved by virtual machine add hard disk capacity

Time:04-28

One, check the disk usage: insufficient storage capacity


Second, add a new hard drive and restart the virtual machine, VM checking their disk


Three, the new partition/dev/sdc1


Four, LVM management
1. View existing volume group name


2. The space for the new assignment to create a physical volume (PV)
/root @ localhost ~ # pvcreate/dev/sdc1
Physical volume "/dev/sdc1" successfully created.

3. Use the new PV expand LVM VG
Lvm> Vgextend centos/dev/sdc1
Volume group "centos" successfully extended

4. Checking their capacity of LV


5. Extend the logical volume/dev/centos/root space
Lvextend -l + 400 g/dev/mapper/centos - root


6. Check the LVM space again, you can see has expanded + 400 g


7. Reread size: xfs_growfs/dev/mapper/centos - root


8. To check the capacity has successfully expanded




Reference:
1. https://www.cnblogs.com/hydd/p/12672797.html
2. https://www.cnblogs.com/lenmom/p/9897739.html









CodePudding user response:

Add physical volume, and then extend the volume?
  • Related