Ubuntu server only uses a part of the available disk space

#46
SOLVED
Topic created · 2 Posts · 76 Views
  • So i have a 240 GB ssd in my server, but i notized when i login it always shows me
    Usage of /: 56.6% of 108.79GB

    So i started to look a bit deeper when i use lsblk the following is printed out:

    NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    loop0                       7:0    0  52.4M  1 loop /snap/certbot/579
    loop1                       7:1    0  96.6M  1 loop /snap/core/9804
    loop2                       7:2    0  97.1M  1 loop /snap/core/9993
    loop3                       7:3    0  29.9M  1 loop /snap/snapd/8790
    loop4                       7:4    0  30.3M  1 loop /snap/snapd/9279
    loop5                       7:5    0    61M  1 loop /snap/core20/634
    loop6                       7:6    0  55.3M  1 loop /snap/core18/1885
    sda                         8:0    0 223.6G  0 disk
    ├─sda1                      8:1    0   512M  0 part /boot/efi
    ├─sda2                      8:2    0     1G  0 part /boot
    └─sda3                      8:3    0 222.1G  0 part
      └─ubuntu--vg-ubuntu--lv 253:0    0   111G  0 lvm  /
    

    with sudo parted /dev/sda print im getting this

    Model: ATA CT240BX200SSD1 (scsi)
    Disk /dev/sda: 240GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags:
    
    Number  Start   End     Size    File system  Name  Flags
     1      1049kB  538MB   537MB   fat32              boot, esp
     2      538MB   1612MB  1074MB  ext4
     3      1612MB  240GB   238GB
    

    So im no expert at all but for me it looks like that the partition (sda3) has the correct size, but ubuntu only uses half of the space? Additionaly i noticed that parted shows no file system for sda3, thats strange, isnt it?

    So is there somebody who can explain what is happening here and how to fix it. To be clear i want that the system can use all of the space not only half of it.

    Update info

    pvs

    PV         VG        Fmt  Attr PSize    PFree
    /dev/sda3  ubuntu-vg lvm2 a--  <222.07g 111.03g
    

    vgs

    VG        #PV #LV #SN Attr   VSize    VFree
    ubuntu-vg   1   1   0 wz--n- <222.07g 111.03g
    

    lvs

    LV        VG        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
    ubuntu-lv ubuntu-vg -wi-ao---- <111.04g
    
  • @nhatduypham1993 solution in my case

    sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv 
    resize2fs /dev/ubuntu-vg/ubuntu-lv
    
  • @nhatduypham1993 solution in my case

    sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv 
    resize2fs /dev/ubuntu-vg/ubuntu-lv
    
Log in to reply