The existing disk storage of the server is "80G", and now it needs to be expanded online to "100G"
键入命令:fdisk -l
Proxmox VE interface to resize disk
After the adjustment is complete, check the disk size on the server
键入命令:fdisk -l
create partition
键入命令:fdisk /dev/sda
键入:n (增加分区)
键入:p(增加主分区)
键入:回车("分区号、起始扇区 " 保持默认)
最后:w(保存并退出)
Check the disk partition information to see if there is a new partition "/dev/sda3"
键入命令:fdisk -l
create physical volume
键入命令:pvcreate /dev/sda3
如果提示sda3找不到,键入:partprobe 或者 重启虚拟机
Use vgscan to query physical volume names
键入命令:vgscan
Use vgextend to add a new physical volume extension "centos"
1. 键入命令:vgextend centos /dev/sda3
2. 键入命令:lvextend -L +20G /dev/mapper/centos-root
”/dev/mapper/centos-root“ 为要扩展的分区名称
Use fdisk -l to view "/dev/mapper/centos-root" file system size changes
键入命令:fdisk -l
Use df -h to see that the "/" directory has not been changed, and the file system needs to be expanded
1. 键入命令:df -h
2. 键入命令:xfs_growfs /dev/mapper/centos-root
3. 键入命令:df -h