我将 VPS 的磁盘大小从 20GB 升级到了 40GB。我不能使用这个新添加的 20GB。fdisk -l
显示 40GB 但du -h
显示 20GB!
root@ubuntu:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 385M 656K 385M 1% /run
/dev/sda1 19G 16G 2.5G 87% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 385M 0 385M 0% /run/user/0
root@ubuntu:~# fdisk -l
Disk /dev/sda: 38.2 GiB, 40961572864 bytes, 80003072 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
Disklabel type: dos
Disk identifier: 0x7a5a5ba2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 80003038 80000991 38.2G 83 Linux