0

Hoping someone will be able to help me unpick this. I have a 250GB SSD drive with a 488MiB /boot partition that is at 100%. I would like to resize the lvm2 partition to allow me to allocate more space to /boot but this is not working via kubuntu live CD using the KDE partition manager. On my kubuntu install gparted reports that only 12MiB is available however this is incorrect as the results from df -h show. KDE partition manager on the installed kubuntu doesnt manage to report a number for used space.

df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                           16G     0   16G   0% /dev
tmpfs                         3.2G  9.5M  3.2G   1% /run
/dev/mapper/kubuntu--vg-root  203G   57G  136G  30% /
tmpfs                          16G   34M   16G   1% /dev/shm
tmpfs                         5.0M  4.0K  5.0M   1% /run/lock
tmpfs                          16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p2                473M  469M     0 100% /boot
/dev/nvme0n1p1                511M  3.5M  508M   1% /boot/efi
tmpfs                         3.2G     0  3.2G   0% /run/user/118
tmpfs                         3.2G   12K  3.2G   1% /run/user/1000
/home/mike/.Private           203G   57G  136G  30% /home/mike

KDE Partition Manager KDE Partition Manager GParted enter image description here

3
  • 1
    Have you tried unmounting it first
    – user689314
    Jun 17, 2017 at 10:03
  • @yamboy1 Unmounting the boot partition or the lvm2? Jun 17, 2017 at 10:24
  • It's been a while since I've done it, but IIRC the PV-shrinking tools described in the duplicate question shrink from the end of the PV. Thus, you may need to shrink enough to create an entirely new and separate /boot at the end of the disk. After you've moved your /boot contents there and tested, you can convert the current /boot partition to a new (small) PV and add it to your VG, should you care about recovering the space.
    – Rod Smith
    Jun 17, 2017 at 23:07

2 Answers 2

1

You need to first shrink LVM logical volumes and only then you can shrink LVM physical volume.

For that you need at least KDE Partition Manager 3.0.x (available in Kububtu 17.04 or various other Live CDs). No version of gparted can resize LVM logical volumes.

P.S. 12 MiB free space is exactly the space not taken up by LVM logical volumes, it is not the free space inside LVM logical partitions.

2
  • 12 MiB is the unused free space! So obvious now you have said it! Top tips all round thanks a lot. I will try with a 17.04 live CD for academic interest but made problem go away now Jun 18, 2017 at 21:41
  • Feel free to ask if you will have problems. LVM stuff in KPM is quite new but hopefully it will be self explanatory. (Note that 17.04 didn't include a small GUI fix, so you would get a nicer GUI if you start from terminal by running "partitionmanager" without sudo). Else you would get this ugly unthemed look as in your screenshot. Jun 18, 2017 at 22:25
0

I fixed the issue of available space by cleaning the boot partition up by following this answer. Much less painful than increasing its size..

https://askubuntu.com/a/259092/350140

For reference the actual command is:

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge

Not the answer you're looking for? Browse other questions tagged .