I had a partition of 91GB added in a logical volume filled to 61G. Now I got an external hard drive and added a couple of partitions 43G and 26G each to the logical volume.

I now want to move the data to these new pvs and repartition the original 91G partition. I started out with pvmove -v /dev/sdxx. But it says Insufficient free space. Not enough extents. I am confused. My vgdisplay shows me as 91.23G allocated. Why?

EDIT: Here's the partition table of my hard disK

  • /dev/sda5 91G

  • /dev/sda1 58G

  • I have my /home as a logical volume with /dev/sda5 as physical volume.(Dumb setup.).

    Anyway, Now i got a external hd partition table as follows

  • /dev/sdb1 43G

  • /dev/sdb2 26G

  • /dev/sdb3 80G

  • df -h /home gives

  • /dev/mapper/home-home--lvm 91G 61G 343M 100% /home

My question is this. I want to remove /dev/sda5 from /home and repartition it. I have the /dev/sdb1 and /dev/sdb2 free. So i want to add them to the lv home. How do i get this done?

link|improve this question

50% accept rate
can you please reformat your question and include a tab formatted list of your HDDs/LVMs information? – Arctor Apr 27 '11 at 19:00
feedback

1 Answer

up vote 0 down vote accepted

I was initially naive enough to just add /dev/sdb1 and /dev/sdb2. And try pvmove on /dev/sda5.

Here are the steps that solved the problem:

  • Boot into maintenance mode, umount the /home

  • resize2fs to within the size the new partitions can hold. (here 68G).*

  • lvresize the logical volume.

  • Use pvmove /dev/sda1*

  • Now pvremove /dev/sda1
  • Format it as you please

    • -- Both highly time consuming operations. You can skip the pvmove and resize the partition following the instructions here. http://www.howtoforge.com/linux_resizing_ext3_partitions But then it involves tampering with the partition table, while the data is not backed up. So you better be aware of the risk involved.
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.