Score:1

Missing disk half space on Ubuntu 18.04.5 LTS VPS

ru flag

My client has a problem with one server, plesk is throwing error 500, and the websites hosted there act weirdly. I found out it's because the system ran out of space, technically. My problem is that when i perform a lsblk command, something weird appears.

NAME          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda             8:0    0   240G  0 disk 
├─sda1          8:1    0   487M  0 part /boot
└─sda2          8:2    0 119.5G  0 part 
  ├─vg00-lv00 253:0    0   1.9G  0 lvm  [SWAP]
  └─vg00-lv01 253:1    0 117.6G  0 lvm  /
sr0            11:0    1  1024M  0 rom  

As you can see, dev/sda has 240GB, which is how much he is paying for storage in the VPS. Looking down on the breakdown, there are just 120GB actually allocated to sda2 where the files are. Where are the other 120GB?

EDIT 1

More commands output

pvdisplay
--- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg00
  PV Size               119.52 GiB / not usable 3.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              30597
  Free PE               0
  Allocated PE          30597
  PV UUID               DMK49M-JflP-GBt9-0kJq-Kk1W-C7vO-x1nUZi

vgdisplay
--- Volume group ---
  VG Name               vg00
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <119.52 GiB
  PE Size               4.00 MiB
  Total PE              30597
  Alloc PE / Size       30597 / <119.52 GiB
  Free  PE / Size       0 / 0   
  VG UUID               WqkIEh-ii6j-YPLK-5XHc-I26V-sAQI-XULRO0

lvdisplay
 --- Logical volume ---
  LV Path                /dev/vg00/lv00
  LV Name                lv00
  VG Name                vg00
  LV UUID                loEucb-0VGb-seQj-3Vs0-5oCC-HUdt-0rJfcp
  LV Write Access        read/write
  LV Creation host, time somehost, 2019-08-29 20:27:48 +0200
  LV Status              available
  # open                 2
  LV Size                <1.91 GiB
  Current LE             488
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Logical volume ---
  LV Path                /dev/vg00/lv01
  LV Name                lv01
  VG Name                vg00
  LV UUID                o6JDyc-lKL9-simp-fDTm-Yhix-2K1U-qiKvc3
  LV Write Access        read/write
  LV Creation host, time somehost, 2019-08-29 20:27:48 +0200
  LV Status              available
  # open                 1
  LV Size                117.61 GiB
  Current LE             30109
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
Score:3
us flag

I guess the server originally had 120 GB disk space, and the original parittioning was made according to that. After expanding the VPS disk size to 240 GB, the partitioning was not updated, so the added disk space is not in use.

To fix this, one needs to expand /dev/sda2 partition, then expand the physical volume, volume group and logical volumes. Finally the filesystem needs to be resized.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.