0

I tried following different answers like here [0], but all of these instructions fail because the system-config-lvm GUI reports the root partition as full, but when I boot into it I can check that only half of the disk space is actually used.

Here is the screenshot of the GUI: enter image description here

edit

Output of df -h

Filesystem                           Size  Used Avail Use% Mounted on
udev                                 946M     0  946M   0% /dev
tmpfs                                193M   21M  173M  11% /run
/dev/mapper/ubuntu16server--vg-root   26G   16G  8.4G  66% /
tmpfs                                965M     0  965M   0% /dev/shm
tmpfs                                5.0M     0  5.0M   0% /run/lock
tmpfs                                965M     0  965M   0% /sys/fs/cgroup
/dev/sda1                             30G   11G   20G  35% /media/usb0
/dev/mmcblk0p2                       473M  121M  329M  27% /boot
/dev/mmcblk0p1                       511M  3.4M  508M   1% /boot/efi
tmpfs                                193M     0  193M   0% /run/user/1000

Output of sudo pvs

  /dev/mmcblk0rpmb: read failed after 0 of 4096 at 4128768: Input/output error
  /dev/mmcblk0rpmb: read failed after 0 of 4096 at 4186112: Input/output error
  /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
  /dev/mmcblk0rpmb: read failed after 0 of 4096 at 4096: Input/output error
  PV             VG                Fmt  Attr PSize  PFree 
  /dev/mmcblk0p3 ubuntu16server-vg lvm2 a--  28.14g 16.00m

Output of sudo vgs

  VG                #PV #LV #SN Attr   VSize  VFree 
  ubuntu16server-vg   1   2   0 wz--n- 28.14g 16.00m

Output of sudo lvs

  LV     VG                Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   ubuntu16server-vg -wi-ao---- 26.20g                                                    
  swap_1 ubuntu16server-vg -wi-ao----  1.93g  

Output of df -i

Filesystem                           Inodes  IUsed   IFree IUse% Mounted on
udev                                 241942    478  241464    1% /dev
tmpfs                                247010    732  246278    1% /run
/dev/mapper/ubuntu16server--vg-root 1716960 135983 1580977    8% /
tmpfs                                247010      1  247009    1% /dev/shm
tmpfs                                247010      5  247005    1% /run/lock
tmpfs                                247010     16  246994    1% /sys/fs/cgroup
/dev/sda1                                 0      0       0     - /media/usb0
/dev/mmcblk0p2                       124928    301  124627    1% /boot
/dev/mmcblk0p1                            0      0       0     - /boot/efi
tmpfs                                247010      4  247006    1% /run/user/1000

[0] How can I resize an LVM partition? (i.e: physical volume)

stdclass
  • 111
  • 1
    please provide the output of: df -h, sudo pvs, sudo vgs and sudo lvs – AtomiX84 Dec 30 '19 at 15:40
  • @AtomiX84 added the output to the original post! – stdclass Dec 30 '19 at 15:47
  • 1
    That partition you see is full is the VolumGroup (that volume is full) all the space of the VG is allocated for the VolumeGroup root and swap, the LV does not use yet all the space, but for reclaim it in the VG you have to reduce the LV first, but I do not recommend you to do this, because the space is not a lot on the / partition and you do not have a separate partition for cache, temps file and logs and by reducing the / partition you will run very quickly out of space. – AtomiX84 Dec 30 '19 at 16:13
  • @AtomiX84 the use case for me is, I need to clone this 32gb linux box onto another, which is 200mb smaller in total and I need to just resize it for that tiny bit. – stdclass Dec 30 '19 at 16:17
  • 1
    Ok, I get it, than the link you post is good, may also you have to reduce the physical volume. To be safe perform a full image of you system before proceed with reduce the root partition this operation could be potentially dangerous and unrecoverable. – AtomiX84 Dec 30 '19 at 16:22
  • @AtomiX84 I tried the steps in the link but I can only reduce the size of the LVM partition by 8MB – stdclass Dec 30 '19 at 16:25
  • 1
    ok, just to make sure, you reduce the LV / partition from a live OS (this because the root partition cannot be unmounted when system is live); after this you reduce the VG a bit less of the LV previously reduced then at the end you reduce the PV. is that correct? – AtomiX84 Dec 30 '19 at 16:31
  • @AtomiX84 I tried reducing the root LV with an Ubuntu 18.04 live stick following this answer from the link above: https://askubuntu.com/a/489909/1010522 – stdclass Dec 30 '19 at 16:37
  • 1
    Did you check free iNodes ? df -i – cmak.fr Dec 30 '19 at 17:36
  • @cmak.fr I added the output of df -i to the post – stdclass Dec 30 '19 at 18:08

0 Answers0