文件系统的长度已经是 65010688 (4k) 块

文件系统的长度已经是 65010688 (4k) 块

请帮助我,当我尝试增加 LVM 中的分区大小,但当我尝试它不起作用时,我执行以下操作:

  df -h


Filesystem                         Size  Used Avail Use% Mounted on
udev                               3.9G     0  3.9G   0% /dev
tmpfs                              795M  1.3M  794M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  244G  113G  121G  49% /


sudo lvextend --resizefs -l +100%FREE ubuntu-vg/ubuntu-lv

  Size of logical volume ubuntu-vg/ubuntu-lv unchanged from <248.00 GiB (63487 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.
resize2fs 1.45.5 (07-Jan-2020)
The filesystem is already 65010688 (4k) blocks long.  Nothing to do!

df -h

 Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  244G  113G  121G  49% /

sudo vgs
  VG        #PV #LV #SN Attr   VSize    VFree
  ubuntu-vg   1   1   0 wz--n- <248.00g    0

lsblk

NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0 63.5M  1 loop /snap/core20/1974
loop1                       7:1    0 63.5M  1 loop /snap/core20/2015
loop2                       7:2    0 91.9M  1 loop /snap/lxd/24061
loop3                       7:3    0 40.9M  1 loop /snap/snapd/20290
loop4                       7:4    0 40.9M  1 loop /snap/snapd/20092
sda                         8:0    0  250G  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    2G  0 part /boot
└─sda3                      8:3    0  248G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0  248G  0 lvm  /
sr0                        11:0    1 1024M  0 rom

sudo vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  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               <248.00 GiB
  PE Size               4.00 MiB
  Total PE              63487
  Alloc PE / Size       63487 / <248.00 GiB
  Free  PE / Size       0 / 0
  VG UUID               Vl06pF-MGCJ-WFC9-Vz45-UCuf-EsEI-9IFP8R

之后一切都保持不变。我不明白我做错了什么。更准确地说,我还没有完全了解。

答案1

LV 已达到约 247 GiB 的最大大小,并且没有更多可用区可供分配:

vgdisplay
--- Volume group ---
VG Name               ubuntu-vg
...
VG Size               <248.00 GiB
PE Size               4.00 MiB
Total PE              63487
Alloc PE / Size       63487 / <248.00 GiB
Free  PE / Size       0 / 0

它包含的文件系统有一半多一点仍未使用:

df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  244G  113G  121G  49% /

答案2

我真是个傻瓜啊。出于某种原因,我认为这一切都可用,而不是还剩下多少。出现这种想法是由于磁盘空间不足的错误。但实际上一切都很好。抱歉胡言乱语(

相关内容