【发布时间】:2019-12-23 15:12:36
【问题描述】:
我在虚拟机上的磁盘太小了,所以我用 VBoxManage 把它变大了,然后用 gparted 将新的可用空间分配给了主分区。但是在使用系统时,我仍然会收到类似“没有可用磁盘空间”的错误 缺少什么?
fdisk -l 显示磁盘 /dev/sda 有 14 GB。这是新尺寸。
[root@office data]# fdisk -l
Disk /dev/sda: 14.0 GB, 13991149568 bytes, 27326464 sectors
Units = Sektoren 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: 0x000a2e1f
Gerät boot. Anfang Ende Blöcke Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 27326463 13150208 8e Linux LVM
Disk /dev/mapper/centos-root: 7159 MB, 7159676928 bytes, 13983744 sectors
Units = Sektoren of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-swap: 859 MB, 859832320 bytes, 1679360 sectors
Units = Sektoren of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
但 df -h 不会在 /centos-root 上显示新的大小。相反,有一些我不明白的 tmpfs 条目。如何将新磁盘空间分配给我的“工作”分区?
[root@office data]# df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/mapper/centos-root 6,7G 6,7G 16K 100% /
devtmpfs 1,9G 0 1,9G 0% /dev
tmpfs 1,9G 0 1,9G 0% /dev/shm
tmpfs 1,9G 8,6M 1,9G 1% /run
tmpfs 1,9G 0 1,9G 0% /sys/fs/cgroup
/dev/sda1 497M 206M 292M 42% /boot
tmpfs 379M 0 379M 0% /run/user/0
【问题讨论】:
标签: centos virtualbox