本帖最后由 徐富荣 于 2023-3-24 09:42 编辑
1、在超融合平台中给虚拟机扩充磁盘。 2、使用df -h命令查看系统磁盘挂载情况。 3、使用lsblk -f命令查看文件系统树状信息 4、使用parted命令建立新的分区(将新的物理卷添加到现有卷组) [root@appser ~]# parted /dev/vda GNU Parted 3.1 Using /dev/vda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vda: 644GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 1075MB 1074MB primary xfs boot 2 1075MB 215GB 214GB primary lvm
(parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? xfs Start? 215G End? 640G (parted) p Model: Virtio Block Device (virtblk) Disk /dev/vda: 644GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 1075MB 1074MB primary xfs boot 2 1075MB 215GB 214GB primary lvm 3 215GB 640GB 425GB primary
(parted) q
5、vgextend命令将物理卷加入到逻辑卷组,lvextend逻辑卷扩容。 [root@iot-dbserver1 ~]# lvextend -l +100%FREE /dev/mapper/centos-home 6、xfs_growfs在线扩展挂载目录。 [root@iot-dbserver1 ~]# xfs_growfs /dev/mapper/centos-home
这样我们的home目录就扩容完成了。 |