HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Software RAID1 On A Running LVM System - Ubuntu Server (http://www.howtoforge.com/forums/showthread.php?t=61503)

aFoP 17th April 2013 21:10

Software RAID1 On A Running LVM System - Ubuntu Server
 
Hi All,
I used the tutorial http://www.howtoforge.com/how-to-set...buntu-11.10-p2 and everything is OK until step "5 Moving Our Data To The RAID Arrays":

Quote:

# pvmove -i 2 /dev/sda5 /dev/md1
Insufficient free space: 59557 extents needed, but only 59525 available
Unable to allocate mirror extents for pvmove0.
Failed to convert pvmove LV to mirrored
# vgreduce server1 /dev/sda5
# pvremove /dev/sda5
Can't pvremove physical volume "/dev/sda5" of volume group "userver" without -ff
Command 'pvdisplay' shows after the error:
Quote:

# pvdisplay
--- Physical volume ---
PV Name /dev/sda5
VG Name server1
PV Size 232.65 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 59557
Free PE 0
Allocated PE 59557
PV UUID l5vKiJ-dVNj-0i4G-51x1-HyIH-mdbv-f30HGo

--- Physical volume ---
PV Name /dev/md1
VG Name server1
PV Size 232.52 GiB / not usable 1.81 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 59525
Free PE 59525
Allocated PE 0
PV UUID YhxGJp-1Qbk-fxx6-zdHL-HEdv-z1ic-8O0SGv
I'm using 2 * 250GB HDDs on a fresh ubuntu server 12.04 installation...
I have put together a script which does the whole tutorial - and successfully did the process in VirtualBox environment ...and no such errors were seen during whole testing in VirtualBox ...
https://www.dropbox.com/sh/8gopfuuqej5jrog/TTK4gVsc0l
Any ideas?

aFoP 21st April 2013 18:16

Finally I've solved it. But let me add that I have faced the same problem even when I wanted to move a 160GB pv to 250GB pv, where partition setup was identical because sda partition setup was copied to sdb.
And when the same problem emerged with two 250GB hdds as well, I have opened this thread to ask for advice.
It seems that I simply didn't have free space on the new pv to store old pv...
So the idea was to decrease the size of original sda pv to 99% of max available space, so that sdb pv will have enough space for it, and it did the job, pvmove is now possible.
http://blog.shadypixel.com/how-to-sh...volume-safely/


All times are GMT +2. The time now is 13:05.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.