[SOLVED] Size from LV is showing not right with df -h

cradud

Member
Nov 2, 2021
2
0
6
47
I modified the virtual hdd and lv size but when I check with df -h its size is wrong.

Code:
df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              6.3G  1.1M  6.3G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  392G   77G  298G  21% /
tmpfs                               32G   80K   32G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  185M  1.7G  11% /boot
tmpfs                              6.3G   12K  6.3G   1% /run/user/1000


lvdisplay
--- Logical volume ---
LV Path                /dev/ubuntu-vg/ubuntu-lv
LV Name                ubuntu-lv
VG Name                ubuntu-vg
LV UUID                y4qvcl-7UFb-4OiN-9dF0-njf2-NoKn-qBhMH1
LV Write Access        read/write
LV Creation host, time ubuntu-server, 2025-02-14 16:33:47 +0000
LV Status              available
# open                 1
LV Size                <1.27 TiB
Current LE             332287
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           252:0

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               <1.27 TiB
PE Size               4.00 MiB
Total PE              332287
Alloc PE / Size       332287 / <1.27 TiB
Free  PE / Size       0 / 0
VG UUID               mqL9dL-dfvk-Oi3Q-NITQ-9NDG-R1a3-73I04c

lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda                         8:0    0  1.3T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    2G  0 part /boot
└─sda3                      8:3    0  1.3T  0 part
  └─ubuntu--vg-ubuntu--lv 252:0    0  1.3T  0 lvm  /
sr0                        11:0    1 1024M  0 rom

pvs
  PV         VG        Fmt  Attr PSize  PFree
  /dev/sda3  ubuntu-vg lvm2 a--  <1.27t    0
 
qm config 111
boot: order=scsi0;ide2;net0
cores: 8
cpu: x86-64-v2-AES
ide2: none,media=cdrom
memory: 65536
meta: creation-qemu=9.0.2,ctime=1739547486
name: UbuntuS
net0: virtio=BC:24:11:01:71E,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
parent: bck170225
scsi0: Stor1:111/vm-111-disk-0.qcow2,iothread=1,size=1300G
scsihw: virtio-scsi-single
smbios1: uuid=b8474266-48b7-47a8-b7b7-5cad1b8dea0e
sockets: 1
vmgenid: 98a45cf1-3b29-44d7-862f-9b241666cd41


how can I fix this error? I already tried a server restart.
 
Last edited:
The output shows that you've extended all the filesystem underlying layers of LVM.

You have not addresses the filesystem itself. Depending on your file system type you need to:
EXT4: sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
XFS: sudo xfs_growfs /

To find out the filesystem type you can: blkid /dev/mapper/ubuntu--vg-ubuntu--lv


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
The output shows that you've extended all the filesystem underlying layers of LVM.

You have not addresses the filesystem itself. Depending on your file system type you need to:
EXT4: sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
XFS: sudo xfs_growfs /

To find out the filesystem type you can: blkid /dev/mapper/ubuntu--vg-ubuntu--lv


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Thank you, problem solved. The solution was the one you suggested.