5

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
Pascal Heßler
  • 53
  • 1
  • 1
  • 4
  • There is a logical volume mounted on `/` that is only 111GB in size. The space is there but it's just not being used. To verify this, add the output of `pvs`,`vgs`, and `lvs` to your question. – Nasir Riley Sep 25 '20 at 14:34
  • That makes sense. How can i add the rest to it? – Pascal Heßler Sep 25 '20 at 14:42
  • I encountered the exact same problem after I installed Ubuntu Server on a 240GB SSD today. It seems to be a default configuration implemented in the install program. – Feng Jiang Dec 01 '21 at 23:58
  • According to Canonical, this new half-disk partitioning is ["by design" in 20.04](https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1907128). A terrible decision since it requires lots of work to correct it if you miss it while setting up a lot of machines at once and is counter-intuitive compared to every other single Linux distribution out there. It even still asks while you set up the LVM mapping if you want to use the full disk. – BobbyMick Feb 17 '22 at 00:50

1 Answers1

7

It looks like the disk was split in three partitions:

The fist partition is labeled and formatted as fat32 and mounted on /boot/efi

The second partition is labeled and formatted as ext4 and mounted on /boot

The remainder of the disks makes up sda3 and is not labeled as a specific file system.
It is managed by the linux logical volume manager. Check with pvdisplay. Physical storage managed by Linux LVM gets managed in a volume group and can be assigned to none or more (what’s in a name) logical volumes. Those logical volumes can in turn be formatted with file systems and mounted.

Possibly not all physical storage is assigned to logical volumes. Check for “free PE” in for instance the pvdisplay and vgdisplay output

Unassigned storage can be used to grow existing logical volumes and file systems or be used for new volumes and file systems , depending on your needs and preferences

Bob
  • 5,805
  • 7
  • 25