I've inherited a server running Ubuntu 14.04.5 LTS that has a single 30 TB RAID partitioned into a very small boot partition and a big LVM partition containing everything else. Here's the current config:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 30T 0 disk
├─sda1 8:1 0 113M 0 part /boot
└─sda2 8:2 0 30T 0 part
├─vg01-root (dm-0) 252:0 0 55,9G 0 lvm /
├─vg01-pooling (dm-1) 252:1 0 1,8T 0 lvm /var/lib/bareos/pooling
├─vg01-postgres (dm-2) 252:2 0 465,7G 0 lvm /postgres
├─vg01-swap (dm-3) 252:3 0 3,7G 0 lvm [SWAP]
└─vg01-storage (dm-4) 252:4 0 27,7T 0 lvm /var/lib/bareos/storage
As you can see, the boot partition is really much too small. So I need to free up a comparably small amount of space at the beginning of sda2 in order to grow sda1. There are lots of well-written tutorials how to shrink an LVM Physical Volume on the 'net, but the freed space invariably shows up at the end of the PV.
Of course I can move the PV after shrinking it, but that would mean copying the entire 30 TB which would take ages, increasing the risk of something going wrong, and appears quite wasteful to me. Is there a better way? It doesn't matter which of the LVs the space is taken from, all of them have a Gig or two to spare.
I don't know of a way to move the start of an LVM PV, but that doesn't mean it's not possible; my knowledge might simply be inadequate.
If you don't hear of a better solution, though, you might consider the following procedure:
/boot
partition. (There are various questions on this site about resizing an LVM PV, like this one and this one.)/boot
partition after the now-shrunken LVM PV./etc/fstab
configurations to use the new/boot
partition's location./boot
partition clean./boot
partition./boot
partition to the volume group so that you can use its space. This might not be worthwhile for only 113MiB, but it is an option if you're desperate to keep that disk space.As a variant, if you don't intend to add the old
/boot
partition to your VG, you could omit everything from step #5 onward. This will give you a backup location where you can store a couple of current kernels in case something bad happens to the new/boot
partition.