一、配置
CentOs-7
vm15
二、原因
df -hl查看虚拟机内存的时候,空间不足,导致好多操作不行
三、开始扩容
3.1、扩充虚拟机硬盘大小
3.2、扩充虚拟机的分区
# 1、查看当前虚拟机的分区
fdisk /dev/sda
# 2、输入 p (查看已有分区)
Command (m for help): p
Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000a6a34
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
# 3、创建分区
Command (m for help): n
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
# 4、确认创建
Select (default p): p
# 5、输入要分区的序号
Partition number (3,4, default 3): 4
# 6、回车
First sector (41943040-83886079, default 41943040):