Resize PV on LVM
- by Paul Tarjan
I have this:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1217 9775552 83 Linux
/dev/sda2 1218 60801 478608480 83 Linux
And I'd like to shrink sda2 by about 10 Gigs to give some more space to sda1. sda2 is a PV on an LVM, but there is some free space in the VG so I don't have to worry about filesystem shrinking.
How can I tell my LVM to move the data off of the first 10 gigs of sda2 and then redo my partition table to give it to sda1?
(I don't have enough free space to just pvremove sda2, which would be the easy solution).