before:esxi调整磁盘空间
修改磁盘
1、查看磁盘分配:lsblk
可以看到sda总300,sda3挂载的lv只使用了120
root@sin:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 300G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 119G 0 part
└─ubuntu--vg-ubuntu_lv 253:0 0 119G 0 lvm /
sr0 11:0 1 1.2G 0 rom
2、fdisk /dev/sda 进入调整
root@sin:~# fdisk /dev/sda
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
GPT PMBR size mismatch (251658239 != 629145599) will be corrected by write.
3、新建分区 n
Command (m for help): n
Partition number (4-128, default 4): # 回车默认4分区
First sector (251656192-629145566, default 2