Why is my ubuntu server 20 saying I have 200GB on my HDD but fdisk shows I have 930GB?

jped

New Member
Joined
Nov 29, 2020
Messages
3
Reaction score
0
Credits
32
jackson@fuckoff:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 785M 1.5M 784M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 196G 170G 17G 92% /
tmpfs 3.9G 8.0K 3.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda2 976M 199M 711M 22% /boot
/dev/loop0 56M 56M 0 100% /snap/core18/1932
/dev/loop1 55M 55M 0 100% /snap/core18/1880
/dev/loop3 68M 68M 0 100% /snap/lxd/18150
/dev/loop2 72M 72M 0 100% /snap/lxd/16099
/dev/loop4 30M 30M 0 100% /snap/snapd/8542
/dev/loop5 31M 31M 0 100% /snap/snapd/9721
/dev/sda1 511M 7.8M 504M 2% /boot/efi
tmpfs 785M 0 785M 0% /run/user/1000

jackson@fuckoff:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM024 HN-M
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C3E56439-12CA-49CF-BB79-3B5260CE2A85

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 3147775 2097152 1G Linux filesystem
/dev/sda3 3147776 1953525134 1950377359 930G Linux filesystem


What is going on?
 


Can you give output of ...

vgdisplay

and...

lvdisplay
 
/dev/mapper/ubuntu--vg-ubuntu--lv 196G 170G 17G 92% /

Interesting, vg is usually a volume-group and lv is usually a logical volume in that volume-group.
/dev/mapper almost always maps to a volume-group.
Did you run that command with sudo?
I suspect your volume group is only using a part of your disk.
There is a way to extend it, but you have to know a few things before you can do this.
(name of volume group, names of logical volumes, etc..)
 
Interesting, vg is usually a volume-group and lv is usually a logical volume in that volume-group.
/dev/mapper almost always maps to a volume-group.
Did you run that command with sudo?
I suspect your volume group is only using a part of your disk.
There is a way to extend it, but you have to know a few things before you can do this.
(name of volume group, names of logical volumes, etc..)
So I did some more research, /dev/mapper/ubuntu-vg/ubuntu-lv is mounted to root, so id have to do a system rescue to fix it. Ugh I'm just going to reinstall unless you can give me instructions on how to resize this? Thanks a lot.
 
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

This will work, if you're lucky and that's actually the name of the logical volume.
vgdisplay and lv display will tell you the names.

I don't know what filesystem format you are using either, but I will assume it's ext4.
After you resize the volume, you have to "grow" the filesystem to take advantage of it.

resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
 

Members online


Top