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).

link|improve this question

If there is free space in your volume group, why don't you simply create a new volume and move some files over? – Zoredache Nov 4 '09 at 5:37
feedback

2 Answers

up vote 1 down vote accepted

man pvresize.

But once you've done that, you'll have a somewhat bigger problem of shrinking sda2 and then relocating all of it to the end of your disk, since the reclaimed space will be at the end of the disk, and you need to get that space between right after the end of sda1.

link|improve this answer
feedback

You can use gparted/parted to move the partition/pv up.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.