我无法使用新分配的可用空间来扩展当前卷,并且无法打开锁。
编辑:停用后,可以扩展它。我再次激活,但没有添加新的 1GB。
Fdisk 显示:
root@youbuntu:~# fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 16777215 15775746 7.5G 5 Extended
/dev/sda5 1001472 16775167 15773696 7.5G 8e Linux LVM
Disk /dev/mapper/ubuntu--vg-root: 5.5 GiB, 5926551552 bytes, 11575296 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 /dev/mapper/ubuntu--vg-swap_1: 1020 MiB, 1069547520 bytes, 2088960 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
有 5.5GB 空间,而不是 7.5。
答案1
看起来所有空间都在那里。看起来你还没有扩展你的文件系统
resize2fs /dev/sda5
e2fsck /dev/sda5
答案2
查找根磁盘:$ df -h
跑步$ lvextend -r -l +100%free /dev/mapper/ubuntu--vg-root