即使磁盘大小为 221.57 GiB,并且没有未分配的磁盘空间,并且 /dev/mapper/ubuntu--vg-ubuntu--lv 只提供 98G,那么其余的去哪儿了?
输出:
fdisk -l /dev/sda
Disk /dev/sda: 223.58 GiB, 240065183744 bytes, 468877312 sectors
Disk model: SanDisk SSD PLUS
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: gpt
Disk identifier: 13AFDE80-C05F-4536-8EC8-A158544DF9E4
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 4198399 4194304 2G Linux filesystem
/dev/sda3 4198400 468875263 464676864 221.6G Linux filesystem
输出:
df -Th
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 586M 3.4M 582M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 98G 23G 71G 24% /
tmpfs tmpfs 2.9G 0 2.9G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sdb1 ext4 458G 55G 380G 13% /hitachi
/dev/sda2 ext4 2.0G 253M 1.6G 14% /boot
overlay overlay 98G 23G 71G 24% /var/lib/docker/...
overlay overlay 98G 23G 71G 24% /var/lib/docker/...
overlay overlay 98G 23G 71G 24% /var/lib/docker/...
overlay overlay 98G 23G 71G 24% /var/lib/docker/...
tmpfs tmpfs 586M 4.0K 586M 1% /run/user/1000
输出:
vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 221.57 GiB
PE Size 4.00 MiB
Total PE 56723
Alloc PE / Size 56723 / 221.57 GiB
Free PE / Size 0 / 0
VG UUID NgPC4F-Fbmw-yXsi-M5hy-Fbnx-f0Bv-13Kwo9
谢谢
答案1
看起来您的 98GB 文件系统位于 221GB 的 LVM 设备上。如果是这种情况,您需要做的就是扩展文件系统。
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
祝你好运
如果您在此设备上有任何重要数据,请先创建备份。