之前安装Centos7的时候没想到那么快就爆盘了,所以要将磁盘扩容
1. 将虚拟机关闭,点击编辑虚拟机设置
2. 扩展容量完成后,开启虚拟机,打开终端
查看到当前根目录是挂载在/dev/sda3目录下
3. 删除sda3,再重建(!!!删除之后不保存退出,直接重建;否则会删除数据)
[root@centos yaya]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes /