0

我将 Ubuntu 20.0.4 LTS 安装到全新的三星 250GB NVMe 上,并在安装过程中使用了所有默认设置。一切似乎都很好,但我没有看到它只在驱动器上显示 ~100GB。如何扩展分区

$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                                16G     0   16G   0% /dev
tmpfs                              3.1G  1.5M  3.1G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   26G   68G  28% /
tmpfs                               16G     0   16G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                               16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p2                     1.5G  111M  1.3G   8% /boot
/dev/loop0                          56M   56M     0 100% /snap/core18/2128
/dev/nvme0n1p1                     1.1G  5.3M  1.1G   1% /boot/efi
/dev/loop1                          62M   62M     0 100% /snap/core20/1328
/dev/loop2                          71M   71M     0 100% /snap/lxd/21029
/dev/loop3                          68M   68M     0 100% /snap/lxd/21835
/dev/loop4                          56M   56M     0 100% /snap/core18/2284
/dev/loop5                          44M   44M     0 100% /snap/snapd/149

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME                      FSTYPE        SIZE MOUNTPOINT        LABEL
loop0                     squashfs     55.4M /snap/core18/2128 
loop1                     squashfs     61.9M /snap/core20/1328 
loop2                     squashfs     70.3M /snap/lxd/21029   
loop3                     squashfs     67.2M /snap/lxd/21835   
loop4                     squashfs     55.5M /snap/core18/2284 
loop5                     squashfs     43.6M /snap/snapd/14978 
nvme0n1                               232.9G                   
├─nvme0n1p1               vfat          1.1G /boot/efi         
├─nvme0n1p2               ext4          1.5G /boot             
└─nvme0n1p3               LVM2_member 230.3G                   
  └─ubuntu--vg-ubuntu--lv ext4          100G /
4

1 回答 1

0

运行这些命令就可以了

sudo lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
于 2022-02-22T01:17:48.710 回答